Quote:
Originally Posted by Nero_3D
You will maybe notice that the you already made something similar with the "/stunts" command
pawn Код:
// if(strcmp("/repair", cmdtext, true) == 0) { if(gTeam[playerid] == TEAM_STUNTS) { if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); return SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been repaired!"); } } }
or you use && (and)
pawn Код:
// if( (strcmp("/repair", cmdtext, true) == 0) && (gTeam[playerid] == TEAM_STUNTS) && (IsPlayerInAnyVehicle(playerid)) ) { RepairVehicle(GetPlayerVehicleID(playerid)); return SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been repaired!"); }
Also read that Control Structures
|
Ah, thankyou. But now i get 26 errors when compiling lol. Its something to do with the brackets. Can you please send me a code snippit of the whole OnPlayerCommandText? Thanks in advance