OnPlayerSpawn -
iBots - 06.11.2013
i want to make gang colors,as if someone is in a family slot 1 for example,when he logs in his color will be the same as slot's 1 color,i have made like this:
if(PlayerInfo[playerid][pFMember] = 1
{
SetPlayerColor(playerid, COLOR_ORANGE);
}

And it shows me an error:
C:\Users\John\Desktop\NGRP+NERP 0.3x\gamemodes\NERP.pwn(11486) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
how to fix?
Re: OnPlayerSpawn -
LocMax - 06.11.2013
it's '==' not '=', two =s and also remove ; from end
if(PlayerInfo[playerid][pFMember] == 1)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
Re: OnPlayerSpawn -
iBots - 06.11.2013
it keeps saying:
C:\Users\John\Desktop\NGRP+NERP 0.3x\gamemodes\NERP.pwn(11486) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: OnPlayerSpawn -
Tagathron - 06.11.2013
LocMax answered you,your 11486 line looks like this:
Код:
if(PlayerInfo[playerid][pFMember] = 1);
But it needs to be like this:
Код:
if(PlayerInfo[playerid][pFMember] == 1)
Re: OnPlayerSpawn -
SeniorGamer - 06.11.2013
place this anywhere in your script
Код:
SetPlayerToTeamColor(playerid)
{
if(PlayerInfo[playerid][pFMember] == 1) { SetPlayerColor(playerid,COLOR_RED); }
else if(PlayerInfo[playerid][pFMember] == 2) { SetPlayerColor(playerid,COLOR_BLUE; }
return 1;
}
and add
Код:
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
return 1;
}
Re: OnPlayerSpawn -
Adannn - 06.11.2013
pawn Код:
if(PlayerInfo[playerid][pFMember] == 1)
{
SetPlayerColor(playerid, COLOR_ORANGE);
}
else SetPlayerColor(playerid, COLOR_GREEN); //this is color for players that non member
Re: OnPlayerSpawn -
iBots - 07.11.2013
Adann,it showed me 2 errors when i used urs:
C:\Users\John\Desktop\NGRP+NERP 0.3x\gamemodes\NERP.pwn(11486) : error 010: invalid function or declaration
C:\Users\John\Desktop\NGRP+NERP 0.3x\gamemodes\NERP.pwn(11490) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
and tegathron it keeps showing the same error
Re: OnPlayerSpawn -
LocMax - 07.11.2013
Quote:
Originally Posted by iBots
Adann,it showed me 2 errors when i used urs:
C:\Users\John\Desktop\NGRP+NERP 0.3x\gamemodes\NERP.pwn(11486) : error 010: invalid function or declaration
C:\Users\John\Desktop\NGRP+NERP 0.3x\gamemodes\NERP.pwn(11490) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
and tegathron it keeps showing the same error
|
Show picture of changed code.