Help NPC - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help NPC (
/showthread.php?tid=127418)
Help NPC -
The_Tough - 13.02.2010
Hi guys ... How could this work ?
Код:
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;
}
And another 1 question,am I able to use commands like /kick <id> on NPCs ?
Re: Help NPC -
boelie - 13.02.2010
Well...i can answer your second question; Yes /kick works for npc
Re: Help NPC -
The_Tough - 13.02.2010
Quote:
Originally Posted by boelie
Well...i can answer your second question; Yes /kick works for npc
|
Hmm maybe other cmds like /ajail and stuff work ? on them /aban ? Custom scripted commands
Re: Help NPC -
The_Tough - 13.02.2010
Uhm soneone please ? :P
Re: Help NPC -
boelie - 13.02.2010
Quote:
Originally Posted by The_Tough
Uhm soneone please ? :P
|
Tell me what you want this code to do. Because i dont understand what you want with it and maybe i can help if you tell me.
Re: Help NPC -
The_Tough - 13.02.2010
I wanted to do /connectnpc <NPC name> <script name>
I want this command like this
/connectnpc test at400ls
Re: Help NPC -
boelie - 13.02.2010
LoL i dont think i can do that, i would make a menu instead of a command
very easy
....
case 0:
connectnpc01 blabla
case1:
connectnpc02
etc..
Re: Help NPC -
The_Tough - 13.02.2010
I though of that too
Re: Help NPC -
boelie - 13.02.2010
..Well...if you use a menu you wont have to remember all the npc names and scriptnames.