05.06.2018, 01:22
You've made
then else
You could make it with two ways the 1st is:
OR
PHP код:
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
You could make it with two ways the 1st is:
PHP код:
if(PlayerInfo[playerid][pAdmin] >= 2)
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1258.7352,-2036.7100,59.4561);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Los Santos!");
}
else
{
SendClientMessage(playerid, -1, NOTADMIN); //If NOTADMIN Is defined
}
return 1;
}
PHP код:
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
{ //without else
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1258.7352,-2036.7100,59.4561);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Los Santos!");
}
return 1;
}