04.09.2010, 16:42
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define teleportmenu 1
#define weaponmenu 1
#if defined FILTERSCRIPT
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/teleport", true))
{
ShowPlayerDialog(playerid, teleportmenu, DIALOG_STYLE_LIST, "Teleport Menu", "DM Area" "\nStunt Area" "\nRace Area" "\nDrift Area" "\nAdmin Area", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == teleportmenu)
{
if(response)
{
if(listitem == 0) //DM AREA
{
SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid, 10);
SendClientMessage(playerid, 0xAA3333AA, "Welcome In DM Area");
return 1;
}
if(listitem == 1) //STUNT AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 2) //RACE AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 3) //DRIFT AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 4) //ADMIN AREA
{
SetPlayerPos(playerid, -2879.232421875, 455.7958984375, 4.8951416015625);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xAA3333AA, "Welcome, In Admin Area. Enjoy In The Admin Area");
}
}
}
return 1;
}