SA-MP Forums Archive
Npc help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Npc help (/showthread.php?tid=102516)



Npc help - kman - 15.10.2009

is there a way to make a registered npc name and log it in when u put isplayernpc function in your script if no does anyone now a way to put npcs on a registration server


Re: Npc help - Joe Staff - 16.10.2009

You could change the variable that signifies a player logged in for the NPC, for example

pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid))
  {
    pLoggedIn[playerid]=1;
    return 1;
  }
  //the rest of your code.
}



Re: Npc help - Jason_Larson - 16.10.2009

Quote:
Originally Posted by Joe Staff
You could change the variable that signifies a player logged in for the NPC, for example

pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid))
  {
    pLoggedIn[playerid]=1;
    return 1;
  }
  //the rest of your code.
}
OMG THANK YOU in a 17 posts topic they couldn't tell me that... Now I just gotta get them to move ! lol Thank you Joe

---Sorry for going off topic


Re: Npc help - Joe Staff - 16.10.2009

Everybody gets one.

*Joe Staff flies away*


Re: Npc help - kman - 16.10.2009

lol from family guy thanks though


Re: Npc help - kman - 16.10.2009

dam i added that and i got this

\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(2777) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(277 : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(3371) : error 017: undefined symbol "SetPlayerToTeamColour"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(3436) : error 017: undefined symbol "SetPlayerToTeamColour"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(3536) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(3537) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(3842) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(3843) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4046) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4047) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4080) : error 017: undefined symbol "StopLoopingAnim"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4504) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4747) : error 017: undefined symbol "SetPlayerToTeamColour"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4861) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4862) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(4989) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5182) : error 017: undefined symbol "PlayerName"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5186) : error 017: undefined symbol "PlayerName"
\Desktop\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5216) : error 079: inconsistent return types (array & non-array)
\Desktop\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5220) : warning 202: number of arguments does not match definition
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5220) : warning 209: function "IsPlayerNPC" should return a value
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5222) : error 017: undefined symbol "pLoggedIn"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5222) : warning 215: expression has no effect
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5222) : error 001: expected token: ";", but found "]"
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5222) : error 029: invalid expression, assumed zero
\samp03svr_RC10-1_win32\gamemodes\3.1.pwn(5222) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


23 Errors.



Re: Npc help - Joe Staff - 16.10.2009

It seems to me you've just copy and pasted a lot of work together, you should convert the script to work on your script.


pLoggedIn was an example variable, you have to find the variable in your script that designates a player as logged in.


Re: Npc help - kman - 16.10.2009

well none worked and i realized i could force spawn them