25.03.2011, 12:54
Quote:
How can i make the /opengate command works only for lv3 admin +
if (strcmp("/opengate", cmdtext, true) == 0) { if(IsPlayerAdmin(playerid)) { MoveObject(SFPDgate,-1571.80, 654.16, 6.08, 1.1); new string[256]; new name[128]; GetPlayerName(playerid,name,12; format(string, sizeof(string), "%s has opened the SFPD gate!",name); SendClientMessageToAll(0x0AFF0AAA, string); } else { return SendClientMessage(playerid,0xFF0000AA,"/opengate is an RCON command."); //If not RCON } GameTextForPlayer(playerid, "~G~gate opening...", 3000, 5); return 1; } |
pawn Код:
if (strcmp("/opengate", cmdtext, true) == 0)
{
if(PlayerInfo[playerid][Level] >= 3)//Change to your admin system.
{
MoveObject(SFPDgate,-1571.80, 654.16, 6.08, 1.1);
new string[256];
new name[128];
GetPlayerName(playerid,name,12;
format(string, sizeof(string), "%s has opened the SFPD gate!",name);
SendClientMessageToAll(0x0AFF0AAA, string);
GameTextForPlayer(playerid, "~G~gate opening...", 3000, 5);
return 1;
}
}