CMD:go(playerid, params[]) {
if(PlayerInfo[playerid][pAdminLevel] > 0) {
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}
//For DIALOG_GO error
#define DIALOG_GO 200
//For pAdminlevel error
enum pInfo
{
pAdminLevel
}
new PlayerInfo[MAX_PLAYERS][pInfo];
CMD:go(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] > 0)
{
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, "Only admins are allowed to use this command!);
return 1;
}
|
PHP код:
|
//For DIALOG_GO error
#define DIALOG_GO 200
//For pAdminlevel error
enum pInfo
{
pAdminLevel
}
new PlayerInfo[MAX_PLAYERS][pInfo];
CMD:go(playerid)
{
if(PlayerInfo[playerid][pAdminLevel]) ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
else SendClientMessage(playerid, COLOR_WHITE, "Only admins are allowed to use this command!");
return 1;
}
|
IceBilizard - Edited
Код:
//For DIALOG_GO error
#define DIALOG_GO 200
//For pAdminlevel error
enum pInfo
{
pAdminLevel
}
new PlayerInfo[MAX_PLAYERS][pInfo];
CMD:go(playerid)
{
if(PlayerInfo[playerid][pAdminLevel]) ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
else SendClientMessage(playerid, COLOR_WHITE, "Only admins are allowed to use this command!");
return 1;
}
|