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;
}
CMD:radiushp(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new Float: fRadius;
if(sscanf(params, "f", fRadius)) return SendClientMessage(playerid, -1, "Syntax: /radiushp [radius]");
new Float: fPlayerPos[3];
GetPlayerPos(playerid, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]);
for(new i = 0; i <= GetPlayerPoolSize(); i++)
if(IsPlayerInRangeOfPoint(i, fRadius, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]))
SetPlayerHealth(i, 100.0);
return 1;
}
|
What is wrong with it? It works fine for me.
If it is to do with the SendClientMessage's I was a bit too lazy to type out the params of it. |