SA-MP Forums Archive
setplayercolor when im spawn [SOLVED] - 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: setplayercolor when im spawn [SOLVED] (/showthread.php?tid=127225)



setplayercolor when im spawn [SOLVED] - RobShakur - 12.02.2010

how to set this?
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("World at War");
AddPlayerClass(287, 215.000000,1860.000000,12.512154, 269.1425, 24, 10000, 36, 10000, 29, 10000);//american's
AddPlayerClass(285, 414.220000,2534.079000,18.519966, 269.1425, 24, 10000, 36, 10000, 29, 10000);//german's
AddPlayerClass(294, -223.000000,2770.000000,62.048306, 269.1425, 24, 10000, 36, 10000, 29, 10000);//russian's
AddPlayerClass(73, -329.484000,1536.500000,75.990000, 269.1425, 24, 10000, 36, 10000, 29, 10000);//japan's
i will set the color example from the japans to red if japan spawn...


Re: setplayercolor when im spawn - GTAguillaume - 12.02.2010

OnPlayerSpawn:
Код:
if(GetPlayerSkin(playerid == YOUR_SKIN_ID) SetPlayerColor(playerid,YOUR_COLOR);
Example:

Код:
if(GetPlayerSkin(playerid == 287) SetPlayerColor(playerid,0xff0000aa);
EDIT: Woooot!! 100posts!!


dont functionaly - RobShakur - 12.02.2010

Код:
public OnPlayerSpawn(playerid)
{
  if(GetPlayerSkin(playerid == 287) SetPlayerColor(playerid,0x0000FFAA);
  if(GetPlayerSkin(playerid == 285) SetPlayerColor(playerid,0x38FF06FF);
  if(GetPlayerSkin(playerid == 294) SetPlayerColor(playerid,0xFF9933AA);
  if(GetPlayerSkin(playerid == 73) SetPlayerColor(playerid,0xFFFFD5FF);
	return 1;
}
Код:
C:\Dokumente und Einstellungen\Robin\Desktop\samp server 0.3a 2\gamemodes\[R]WW.pwn(38) : warning 217: loose indentation
C:\Dokumente und Einstellungen\Robin\Desktop\samp server 0.3a 2\gamemodes\[R]WW.pwn(218) : error 001: expected token: ")", but found "-identifier-"
C:\Dokumente und Einstellungen\Robin\Desktop\samp server 0.3a 2\gamemodes\[R]WW.pwn(219) : error 001: expected token: ")", but found "-identifier-"
C:\Dokumente und Einstellungen\Robin\Desktop\samp server 0.3a 2\gamemodes\[R]WW.pwn(220) : error 001: expected token: ")", but found "-identifier-"
C:\Dokumente und Einstellungen\Robin\Desktop\samp server 0.3a 2\gamemodes\[R]WW.pwn(221) : error 001: expected token: ")", but found "-identifier-"
C:\Dokumente und Einstellungen\Robin\Desktop\samp server 0.3a 2\gamemodes\[R]WW.pwn(306) : warning 217: loose indentation
C:\Dokumente und Einstellungen\Robin\Desktop\samp server 0.3a 2\gamemodes\[R]WW.pwn(354) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: setplayercolor when im spawn [SOLVED] - MadeMan - 12.02.2010

Add extra ")" bracket

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == 287) SetPlayerColor(playerid,0x0000FFAA);
    else if(GetPlayerSkin(playerid) == 285) SetPlayerColor(playerid,0x38FF06FF);
    else if(GetPlayerSkin(playerid) == 294) SetPlayerColor(playerid,0xFF9933AA);
    else if(GetPlayerSkin(playerid) == 73) SetPlayerColor(playerid,0xFFFFD5FF);
    return 1;
}