NPC on Larp edit.
#1

hey guys i have a problem to get NPCs to work on my LARP edit =(

when i start the server i got it to work that the NPC joins but he/it dont spawns -.-

can anyone help me with a step by step answer?


thnx in advantage
Reply
#2

Solution: Get rid of the LARP edit and script your own.
Reply
#3

lol what a n00b answer thnx for nothing...

i think the larp script is cool so i want just add some bots / npcs ....

pls someone help me =(
Reply
#4

Quote:
Originally Posted by r9x
lol what a n00b answer thnx for nothing...

i think the larp script is cool so i want just add some bots / npcs ....

pls someone help me =(
A noob is someone that replaces letters with numbers.
Reply
#5

ich hдtte auch spast sagen kцnnen...

oh thnx this is the answer i need....

dudes... i rly want to add some bot/npc to the LARP edit and im not good in scripting... me and my friend got it working that the NPC joins the server but it dont log in :/

i even read the tutorials but.. i cant find a solutuon for LARD / GodFather edits -.-

so pls help?

just some suggestions how it could work.

Reply
#6

Quote:
Originally Posted by r9x
ich hдtte auch spast sagen kцnnen...

oh thnx this is the answer i need....

dudes... i rly want to add some bot/npc to the LARP edit and im not good in scripting... me and my friend got it working that the NPC joins the server but it dont log in :/

i even read the tutorials but.. i cant find a solutuon for LARD / GodFather edits -.-

so pls help?

just some suggestions how it could work.

Quote:
Originally Posted by CPrescott
Solution: Get rid of the LARP edit and script your own.
Reply
#7

it does not madder if its a GF or LARP edit...


i found out it has todo with the "login system"


so i wanna use my Larp Edit now i need a soloution that the BOTS / NPCS dont need to login...

i dont know why u guys so mean and not help with this =(

someone meant i have to do this:



under this...
public SetPlayerSpawn(playerid)


this code:


new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "BOTNAME", true)) {
PutPlayerInVehicle(playerid,BOTAUTO,0)
}
return 1;
}



then:

new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "BOTNAME", true)) {
PutPlayerInVehicle(playerid,BOTAUTO,0)
}
return 1;
}

public OnPlayerRequestClass(playerid, classid)


and this:

new playername[64];
GetPlayerName(playerid,playername,64);

if(IsPlayerNPC(playerid))
{
if(!strcmp(playername,"BOTNAME",true)) {
OnPlayerCommandText(playerid,"/login bot_passwort"); // Ihr mьsst zuerst einen Account mit Passwort fьr den Bot erstell haben
}
}


omg i get errors...

please guys we work 6 hours but no solution...
Reply
#8

Just do OnPlayerConnect:

Код:
if(IsPlayerNPC(playerid))
{
	//void login.
	//Spawn and all that stuff.
}
Reply
#9

ill try thnx
Reply
#10

ok we got it work that he logged in...

code:

public OnPlayerConnect(playerid)
{
if (IsPlayerNPC(playerid))
{
OnPlayerCommandText(playerid,"/login bot"); //-- the NPC logs in with password "bot" WORKING
SendClientMessageToAll(0x00000000,"An NPC connected!"); //---- this message dont shows.. =(
return 1;
}
new plname[MAX_PLAYER_NAME];


we created a rec file and so on like in this thread: http://forum.sa-mp.com/index.php?topic=119947.0


but now the NPC stands there and respawns like every 30-60 secs...

any idea?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)