24.05.2011, 13:16
Код:
//=================/spgate=================// if(strcmp(cmd, "/spgate", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pJob] == 30 || PlayerInfo[playerid][pJob] == 31) { { SendClientMessage(playerid, COLOR_WHITE, "You have placed a Adm Gate, /sprgate to Remove All Adm Gates."); new Float:X,Float:Y,Float:Z,Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid,A); if(PlayerInfo[playerid][pJob] == 30) { RoadBlocksAdmin++; RoadBlockObject[RoadBlocksAdmin] = CreateObject(974, X, Y+1, Z, 0, 0, A); } else { RoadBlocksAdmin++; RoadBlockObjectFBI[RoadBlocksAdmin] = CreateObject(974, X, Y+1, Z, 0, 0, A); } } else { SendClientMessage(playerid, COLOR_GREY, " You rank is to low to set a Road Block !"); return 1; } } } return 1; } if(strcmp(cmd, "/sprgate", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pJob] == 30 || PlayerInfo[playerid][pJob] == 31) { { SendClientMessage(playerid, COLOR_WHITE, "All Adm Gates destroyed.."); for(new o = 0; o < MAX_OBJECTS; o++) { if(PlayerInfo[playerid][pJob] ==30) { DestroyObject(RoadBlockObjectAdmin[o]); RoadBlocksAdmin = 0; } else { DestroyObject(RoadBlockObjectAdmin[o]); RoadBlocksAdmin = 0; } } } else { SendClientMessage(playerid, COLOR_GREY, " You are not allowed to create a Adm Gate !"); return 1; } } } return 1; }
Код:
if (PlayerInfo[playerid][pRank] > 1) {
(PS: Same Problem for the second command)