Sziastok! elkezdtem írni egy dialogos parncs menüt kész lett beírom a parncsát akkor a telport menüm menüit hozza be. Ha kiveszem a teleport menüt akkor minden szép és jó, megy. It vannak a menük:
CMDS:
[pawn]#include <a_samp>
#define CMDS 200
#define FILTERSCRIPT
#define COLOR_BLUE 0x9ACD32FF
#define CMDS_HELP 300
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(\"/cmds\", cmdtext, true))
{
ShowPlayerDialog(playerid, CMDS, DIALOG_STYLE_LIST, \"PARANCSOK LISTÁJA\", \"Általános Parancsok\", \"Kiválasztás\", \"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == CMDS)
{
if(response)
{
if(listitem == 0) // Általános Parancsok
{
ShowPlayerDialog(playerid, CMDS+1, DIALOG_STYLE_LIST, \"Általános Parancsok\", \"Bank\\nVisszaszámláló\\nTeleportok\\nHelp\", \"Kiválasztás\", \"Mégse\");
}
}
return 1;
}
if(dialogid == CMDS+1) //Általános Parancsok
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,CMDS_HELP,DIALOG_STYLE_MSGBOX,\"........\",\"Ok\",\"Vissza\");
}
}
return 1;
}
return 0;
}[/pawn]
Telport menü:
[pawn]#include <a_samp>
#define DIALOGID 200
#define FILTERSCRIPT
#define COLOR_BLUE 0x9ACD32FF
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/tele\", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, \"Teleportmenu\", \"Általános Teleportok\\nDriftek\\nStuntok\", \"Kiválasztás\", \"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOGID)
{
if(response)
{
if(listitem == 0) // Általános Teleportok
{
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, \"Általános Teleportok\", \"Kezd (Air-LS)\\nSan Fierro (SF)\\nLas Venturas (LV)\\nAir-Lv\\nAir-sf\\n\\nJizzy\\nChilliad\\nTengerpart\\nSivatag\\nTuningolo\\nGetto\", \"Kiválasztás\", \"Mégse\");
}
if(listitem == 1) // Driftek
{
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, \"Driftek\", \"Drift1\\nDrift2\\nDrift3\", \"Kiválasztás\", \"Mégse\");
}
if(listitem == 2) // Stuntok
{
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, \"Stuntok\", \"Mcdonald\", \"Kiválasztás\", \"Mégse\");
}
}
return 1;
}
if(dialogid == DIALOGID+1) //Általános Teleportok
{
if(response)
{
if(listitem == 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid),1995.9027,-2638.5066,13.5469);//ez kocsival
SetPlayerPos(playerid, 1984.1838,-2659.3738,21.7390);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a kezden!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a kezdre (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 1)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-1976.4326,288.0257,35.1719);//ez kocsival
SetPlayerPos(playerid, -1976.4326,288.0257,35.1719);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv San Fierroban!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált San Fierroba (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid),2187.5503,1675.6205,11.1074);//ez kocsival
SetPlayerPos(playerid, 2187.5503,1675.6205,11.1074);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv Las Venturasban!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált Las Venturasba (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 3)
{
SetVehiclePos(GetPlayerVehicleID(playerid),1412.2479,1844.7388,10.8287);//ez kocsival
SetPlayerPos(playerid, 1412.2479,1844.7388,10.8287);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a Las Venturasi reptéren!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Las Venturasi reptérre (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 4)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-1645.8783,-287.2897,14.1484);//ez kocsival
SetPlayerPos(playerid, -1645.8783,-287.2897,14.1484);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a San Fierroi reptéren!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a San Fierroi reptérre (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 5)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-2630.2886,1355.5831,7.1028);//ez kocsival
SetPlayerPos(playerid, -2630.2886,1355.5831,7.1028);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a Jizzy Club-nál!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Jizzy Club-hoz (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 6)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-2241.4741,-1732.2726,480.3542);//ez kocsival
SetPlayerPos(playerid, -2241.4741,-1732.2726,480.3542);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a Chilliad hegyen!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált Chilliad hegyre (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 7)
{
SetVehiclePos(GetPlayerVehicleID(playerid),317.6685,-1784.0103,4.6933);//ez kocsival
SetPlayerPos(playerid, 317.6685,-1784.0103,4.6933);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a Tengerparton!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a tengerpartra! (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem ==
{
SetVehiclePos(GetPlayerVehicleID(playerid),405.8245,2483.0779,16.4844);//ez kocsival
SetPlayerPos(playerid, 405.8245,2483.0779,16.4844);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a Sivatagban!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Sivatagba! (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 9)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-2691.6287,217.4170,4.1797);//ez kocsival
SetPlayerPos(playerid, -2691.6287,217.4170,4.1797);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a Tuningolonál!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Tuningoloóhoz! (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 10)
{
SetVehiclePos(GetPlayerVehicleID(playerid),2499.9438,-1683.9733,13.4124);//ez kocsival
SetPlayerPos(playerid, 2499.9438,-1683.9733,13.4124);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv a Getto-nál!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Gettoba! (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
}
return 1;
}
if(dialogid == DIALOGID+2) //Driftek
{
if(response)
{
if(listitem == 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-2408.0193,-598.2673,132.6484);//ez kocsival
SetPlayerPos(playerid, -2408.0193,-598.2673,132.6484);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv Drift1-en!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Drift1-re (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 1)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-343.0818,1541.9465,75.5625);//ez kocsival
SetPlayerPos(playerid, -343.0818,1541.9465,75.5625);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv Drift2-õn!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Drift2-re (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
if(listitem == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid),2272.3330,1388.4868,42.8203);//ez kocsival
SetPlayerPos(playerid, 2272.3330,1388.4868,42.8203);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv Drift3-on!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált a Drift3-ra (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
}
return 1;
}
if(dialogid == DIALOGID+3) //Stuntok
{
if(response)
{
if(listitem == 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid),1030.8206,-455.0317,51.4649);//ez kocsival
SetPlayerPos(playerid, 1030.8206,-455.0317,51.4649);//ez gyalog
SendClientMessage(playerid, COLOR_BLUE, \"Üdv Mcdonald farmján!\");//amikor elteleportál ide ezt fogja kiirni neki
new string [ 128 ], pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), \"%s Elteleportált Mcdonald farmjára (/Tele)\", pName );
SendClientMessageToAll ( 0x9ACD32FF, string );
}
}
return 1;
}
return 0;
}[/pawn]