if(playerDB[playerid][admin])
COMMAND:menu(playerid, params[])
if(IsPlayerConnected(playerid) && IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_INFO, "You must be RCON login to use this command!");
return 1;
}
Where should i put this line:
Код:
if(playerDB[playerid][admin]) |
if(!strcmp("/telvm", cmdtext, true))
{
if(playerDB[playerid][admin] || playerDB[playerid][vip])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
SetVehiclePos(veh, -1994.4752, -83.9042, 35.8087);
SetVehicleVirtualWorld(veh, 0);
LinkVehicleToInterior(veh, 0);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
PutPlayerInVehicle(playerid, veh, 0);
}
else
{
SetPlayerPos(playerid, -1994.4752, -83.9042, 35.8087);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
}
return 1;
}
COMMAND:menu(playerid, params[])
if(playerDB[playerid][admin] || playerDB[playerid][vip]) // If player is admin or VIP.
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_INFO, "You must be administrator or VIP to use this command!");
return 1;
}
if(!strcmp("/menu", cmdtext, true))
{
if(playerDB[playerid][admin] || playerDB[playerid][vip]) // If player is admin or VIP.
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_INFO, "You must be administrator or VIP to use this command!");
}
return 1;
}