27.05.2015, 20:09
Код:
COMMAND:radiushp(playerid, params[]) { new radius, Float:health, Float:x, Float:y, Float:z; if(sscanf(params, "df", radius, health)) return SendClientMessage(); GetPlayerPos(playerid, x, y, z); for(new i = 0; i <= GetPlayerPoolSize(); i++) if(IsPlayerInRangeOfPoint(i, radius, x, y, z); { SetPlayerHealth(playerid, health); } return 1; }
Код:
COMMAND:respawncars(playerid, params[]) { new radius, Float:x, Float:y, Float:z; if(sscanf(params, "d", radius)) return SendClientMessage(); for(new i = 0; i <= GetVehiclePoolsize(); i++) if(IsPlayerInRangeOfPoint(i, radius, x, y, z); { GetVehiclePos(i, x, y, z); if(IsPlayerInRangeOfPoint(i, radius, x, y, z) return SetVehicleToRespawn(i); } return 1; }