01.03.2010, 05:05
Hey i'm working on some code that only ranks Private 2nd can go in. And it's not working -.-. (I know i use >>Sandra<<'s inc [RANKS] but i think it's something wrong with code.)
Here is code :
Here is code :
Код:
//on top forward PC(playerid); //on gamemodeint SetTimer("PC", 1000, true); //bottom of script public PC(playerid) //PlayerCheck { for(new i=0;i<MAX_PLAYER;i++) { if(IsPlayerConnected(i)) { if(IsPlayerInAnyVehicle(i)) { new vehicleid = GetPlayerVehicleID(i); new denied=0; new Float:x, Float:y, Float:z; GetPlayerPos(i, x, y, z); if(GetVehicleModel(vehicleid) == 432) { if(GetPlayerRank(playerid) == 3) { GameTextForPlayer(i, "~w~Rank: ~b~Private 2st Class~r~ needed~w~!", 2000, 3); denied = 1; } } if(denied == 1) { SetPlayerToPos(i, x, y, z+1); RemovePlayerFromVehicle(i); } } } } return 1; }