21.05.2011, 18:59
Do some like this
with sscanf
pawn Code:
dcmd_destroy(playerid, params[])
{
new id,Float:x,Float:y,Float:z;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xAA3333AA, "/destroy [ID / NAME]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAA3333AA, "this command is for admins only");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAA3333AA, "This Player is offline");
GetPlayerPos(id, x, y, z);
CreateExplosion(x, y, z, 7, 10.0);
CreateExplosion(x, y, z, 7, 10.0);
return 1;
}