09.03.2012, 00:14
Simple, via ZCMD & SSCANF:
pawn Код:
CMD:npcrestart(playerid,params[])
{
new id, string[128];
if(sscanf(params,"d",id)) return SendClientMessage(playerid,-1,"USAGE: /npcrestart [npc id] - Enter The Bot ID To Restart.");
if(!IsPlayerNPC(id)) return SendClientMessage(playerid,-1,"The specified player is not a bot.");
SpawnPlayer(id);
format(string,128,"You Have Reset Bot ID %d At Its Original Start Path.",id); SendClientMessage(playerid,-1,string);
return 1;
}