NPC on Larp edit. -
r9x - 30.01.2010
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
Re: NPC on Larp edit. -
Devine - 30.01.2010
Solution: Get rid of the LARP edit and script your own.
Re: NPC on Larp edit. -
r9x - 30.01.2010
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 =(
Re: NPC on Larp edit. -
Norn - 30.01.2010
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.
Re: NPC on Larp edit. -
r9x - 30.01.2010
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.
Re: NPC on Larp edit. -
Eazy_Efolife - 30.01.2010
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.
|
Re: NPC on Larp edit. -
r9x - 30.01.2010
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...
Re: NPC on Larp edit. -
Norn - 30.01.2010
Just do OnPlayerConnect:
Код:
if(IsPlayerNPC(playerid))
{
//void login.
//Spawn and all that stuff.
}
Re: NPC on Larp edit. -
r9x - 30.01.2010
ill try thnx
Re: NPC on Larp edit. -
r9x - 30.01.2010
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?