04.01.2018, 20:51
In my gamemode, I use these type of commands:
Quote:
COMMAND:hidename(playerid, params[]) { for(new i = GetPlayerPoolSize(); i != -1; --i) ShowPlayerNameTagForPlayer(playerid, i, false); for(new i = GetPlayerPoolSize(); i != -1; --i) ShowPlayerNameTagForPlayer(i, playerid, false); // Do something return 1; } CMD:fix(playerid, params[]) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You are not in a vehicle!"); if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1, "You are not in the driver seat!"); RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, -1, "Your vehicle has been sucessfully repaired!"); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); return 1; } COMMAND:armour(playerid, params[]) { SetPlayerArmour(playerid, 100); // Do something return 1; } |