bots+sagc rp need help!please -
krille120 - 11.10.2009
So everything is good except I need to trick the server into thinking that the bots are logged in and registred so I think I got it.
I got this under onplayerconnect
Код:
if(IsPlayerNPC(playerid))
PlayerInfo[playerid][gPlayerLogged] =1
and when compling I get this for an answer
Код:
C:\Documents and Settings\Kristian\Skrivbord\0.3\gamemodes\sagc.pwn(1399) : error 033: array must be indexed (variable "gPlayerLogged")
C:\Documents and Settings\Kristian\Skrivbord\0.3\gamemodes\sagc.pwn(1401) : error 001: expected token: ";", but found "-identifier-"
so please help me if you can
![Smiley](images/smilies/smile.png)
I'd really like to have some bots driving around since the server wont have many players in the beginning :P
Re: bots+sagc rp need help!please -
zimtar - 11.10.2009
you could try
Код:
new gPlayerLogged
if(IsPlayerNPC(playerid))
PlayerInfo[playerid][gPlayerLogged] =1
as for the expected ; you need to post more of your code to see where ya need to place that thing
im no scripter but that should work i think
Re: bots+sagc rp need help!please -
labiloute - 11.10.2009
i, you must set if(IsPlayerNPC(playerid)) return 1; in OnPlayerSpawn like this
Код:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid)) return 1;
Code ...
}
and OnPlayerRequestClass ...
That and your bot normally spawn and walk !!
Re: bots+sagc rp need help!please -
krille120 - 11.10.2009
Quote:
Originally Posted by zimtar
you could try
Код:
new gPlayerLogged
if(IsPlayerNPC(playerid))
PlayerInfo[playerid][gPlayerLogged] =1
as for the expected ; you need to post more of your code to see where ya need to place that thing
im no scripter but that should work i think
|
is this supposed to be under onplayerconnect or?:P sorry for being nub
the second error is gone now anyways :P
Re: bots+sagc rp need help!please -
Correlli - 11.10.2009
You forgot
;
pawn Код:
if(IsPlayerNPC(playerid)) PlayerInfo[playerid][gPlayerLogged] = 1;
Re: bots+sagc rp need help!please -
dzindzis11 - 11.10.2009
I suggest u to download athers npc's and lokk in their pawn then look what u have made wrong..
Re: bots+sagc rp need help!please -
krille120 - 11.10.2009
I'm not creating a script for the NPC I'm fixing so it wont have to log in
Re: bots+sagc rp need help!please -
Beaver07 - 11.10.2009
Quote:
Originally Posted by Don Correlli
You forgot ;
pawn Код:
if(IsPlayerNPC(playerid)) PlayerInfo[playerid][gPlayerLogged] = 1;
|
just add the ; like Don Said it should compile after that.
Re: bots+sagc rp need help!please -
krille120 - 11.10.2009
Quote:
Originally Posted by Don Correlli
You forgot ;
pawn Код:
if(IsPlayerNPC(playerid)) PlayerInfo[playerid][gPlayerLogged] = 1;
|
after doing this I get this :/
Код:
C:\Documents and Settings\Kristian\Skrivbord\0.3\gamemodes\sagc.pwn(1398) : error 033: array must be indexed (variable "gPlayerLogged")
What is wrong :P I wish I were a pro atm
Re: bots+sagc rp need help!please -
Beaver07 - 11.10.2009
i dont think it's PlayerInfo[playerid][gPlayerLogged] are you sure it's not gPlayerLogged[playerid] , check your enum for gPlayerLogged and see if there is a variable max players on it.
Edit: Just looking on your first post the new gPlayerLogged should be in your PlayerInfo Enum.
IE
Код:
enum pInfo
{
gPlayerLogged,
gPlayerHealth,
gPlayerArmour,
etc ,
}
Something along the lines of that