help with team colors and skin choosing - 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: help with team colors and skin choosing (
/showthread.php?tid=74845)
help with team colors and skin choosing -
WardenCS - 26.04.2009
hello,i got problem,i got code like that!
Quote:
public OnPlayerRequestClass(playerid, classid)
{
GameTextForPlayer(playerid, "~p~Army", 1500, 14);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2176.9158,-1676.7103,14.6513);
SetPlayerFacingAngle(playerid, 76.9820);
SetPlayerCameraPos(playerid, 2171.0,-1677.0,15.0);
SetPlayerCameraLookAt(playerid, 2171.0,-1677.0,15.0);
SetPlayerColor(playerid,0x9ACD32AA);
SetPlayerTeam(playerid,1);
ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1, 1,1,1,1,1);
return 1;
}
|
how i can make it for 2 skins and other ones should say FBI and be color Blue..how i can do that?
Re: help with team colors and skin choosing -
Backwardsman97 - 26.04.2009
You can use a switch statement. There's actually an example in one of the modes that comes with the server package. I think it's the A51 break in.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
GameTextForPlayer(playerid, "~p~Army", 1500, 14);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2176.9158,-1676.7103,14.6513);
SetPlayerFacingAngle(playerid, 76.9820);
SetPlayerCameraPos(playerid, 2171.0,-1677.0,15.0);
SetPlayerCameraLookAt(playerid, 2171.0,-1677.0,15.0);
SetPlayerColor(playerid,0x9ACD32AA);
SetPlayerTeam(playerid,1);
ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1,1,1,1,1,1);
}
case 1:
{
//Do your FBI stuff here
}
}
return 1;
}
Re: help with team colors and skin choosing -
WardenCS - 26.04.2009
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\AvsF.pwn(161) : error 002: only a single statement (or expression) can follow each "case"
whats that
Re: help with team colors and skin choosing -
Backwardsman97 - 26.04.2009
Did you add anything else in?
pawn Код:
switch(statement)
{
case 0:
{
//Your code here
}
case 1:
{
//Your code here
}
//etc..
//Only cases can go in the switch statement, not anything else
}