13.02.2010, 12:50
Hi guys ... How could this work ?
And another 1 question,am I able to use commands like /kick <id> on NPCs ?
Код:
dcmd_connectnpc(playerid,params[]){ if(PlayerData[playerid][Level] >= 5) { new tmp[256],Index,string[156]; tmp = strtok(params,Index); new name = strval(params),script = strval(tmp); if(!strlen(params)) return LRS(playerid,"[ NPC ] Correct usage : /connectnpc <NPC Name> <Script Name>"); if(!strlen(tmp)) return NMC(playerid,"[ NPC ] You must enter the script name !"); format(string,sizeof(string),"[ NPC ] You added a NPC with name %s and the script file %s",name,script); ACM(playerid,string); ConnectNPC("name","script"); } return 1; }