Help NPC
#1

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 ?
Reply
#2

Well...i can answer your second question; Yes /kick works for npc
Reply
#3

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
Reply
#4

Uhm soneone please ? :P
Reply
#5

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.
Reply
#6

I wanted to do /connectnpc <NPC name> <script name>

I want this command like this

/connectnpc test at400ls

Reply
#7

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..
Reply
#8

I though of that too
Reply
#9

..Well...if you use a menu you wont have to remember all the npc names and scriptnames.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)