if(sscanf(params,"i",id))
new giveplayerid, float:health;
if(sscanf(params, "uF", giveplayerid, health))
{
SetPlayerHealth(giveplayerid, health);
}
CMD:kill(playerid, params[]) {
new
lookupid;
if (sscanf(params, "U", lookupid)) {
SendClientMessage(playerid, -1, "USAGE: You can use \"/kill [playerid]\"");
SetPlayerHealth(playerid, 0.0);
}
else {
if (!IsPlayerConnected(lookupid)) {
return SendClientMessage(playerid, -1, "ERROR: The specified player is not connected.");
}
SetPlayerHealth(lookupid, 0.0);
}
return 1;
}
CMD:kill(playerid, params[])
{
new targetid;
if(sscanf(params, "U", targetid)) {
return SetPlayerHealth(playerid, 0);
}
SetPlayerHealth(targetid, 0);
return 1;
}
CMD:kill(playerid, params[])
{
new lookupid = INVALID_PLAYER_ID;
if(sscanf(params, "u", lookupid)) {
SendClientMessage(playerid, -1, "USAGE: You can use \"/kill [playerid]\"");
SetPlayerHealth(playerid, 0.0);
return 1;
}
if(!IsPlayerConnected(lookupid)) {
SendClientMessage(playerid, -1, "ERROR: The specified player is not connected.");
return 1;
}
SetPlayerHealth(lookupid, 0.0);
return 1;
}
CMD:kill(playerid, params[])
{
new lookupid = -1;
sscanf(params, "U(-1)", lookupid);
if(lookupid == -1)
{
SendClientMessage(playerid, -1, "USAGE: You can use \"/kill [playerid]\"");
SetPlayerHealth(playerid, 0.0);
}
else if(!IsPlayerConnected(lookupid))
SendClientMessage(playerid, -1, "ERROR: The specified player is not connected.");
else
SetPlayerHealth(lookupid, 0.0);
return 1;
}
CMD:kill(playerid, params[])
{
if(sscanf(params, "d", params[0])) return SetPlayerHealth(playerid, 0.0);
SetPlayerHealth(params[0], 0.0);
return 1;
}
pawn Код:
|