#6

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;
}
Reply


Messages In This Thread
NPC - by SnG.Scot_MisCuDI - 08.03.2012, 01:15
Re: NPC - by SnG.Scot_MisCuDI - 08.03.2012, 21:15
Re: NPC - by grand.Theft.Otto - 08.03.2012, 23:43
Re: NPC - by SnG.Scot_MisCuDI - 08.03.2012, 23:57
Re: NPC - by chrism11 - 09.03.2012, 00:04
Re: NPC - by grand.Theft.Otto - 09.03.2012, 00:14

Forum Jump:


Users browsing this thread: 2 Guest(s)