[Help] Small BOT script
#8

Well you can't just use "i" instead of "playerid", you need to define it.
As you see, functions like OnPlayerConnect has a (playerid) parameter, therefore it's already defined.
People often create a loop between all players, and rename the playerid (that it's looping through) to "i", but you cannot do this if you haven't looped through players and defined "i".
pawn Код:
public OnFilterScriptInit()
As you can see, there's no "playerid" parameter, so you cannot "SetPlayerSkin(playerid".

Also, i don't think OnPlayerConnect is called when a NPC connects to the server, for that you should use OnNPCConnect.

I know you found a fix to all of this, but just an explanation so you know why these problems occured.
Reply


Messages In This Thread
[Help] Small BOT script error [SOLVED] - by DukeVega - 31.01.2015, 17:13
Re: [Help] Small BOT script - by CalvinC - 31.01.2015, 17:51
Re: [Help] Small BOT script - by DukeVega - 31.01.2015, 18:07
Re: [Help] Small BOT script - by CalvinC - 31.01.2015, 18:10
Re: [Help] Small BOT script - by DukeVega - 31.01.2015, 18:11
Re: [Help] Small BOT script - by DukeVega - 31.01.2015, 18:39
Re: [Help] Small BOT script - by DukeVega - 31.01.2015, 19:08
Re: [Help] Small BOT script - by CalvinC - 31.01.2015, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)