04.01.2010, 14:29
How to do that is emitted when a player dies of arms and money. And the skin 240 such that the name of color more blue. From the wiki sa-mp anything we understand. Thanks in advance for codes
![Smiley](images/smilies/smile.png)
Originally Posted by Seif_
You should ask here so they can understand you better:
http://forum.sa-mp.com/index.php?board=78.0 |
#define YOURCOLOR FFFFFFAA
#define YOURCOLOR2 F6F6FFAA
new pClass[MAX_PLAYERS];
public OnGameModeInit()
{
//For example you have these on OnGameModeInit()
AddPlayerClass(3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); //class 0
AddPlayerClass(18, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // class1
}
// So here's what you need:
public OnPlayerRequestClass(playerid, classid)
{
pClass[playerid] = classid;
}
public OnPlayerRequestSpawn(playerid)
{
if(pClass[playerid] == 0)
{
SetPlayerColor(playerid,YOURCOLOR);
}
if(pClass[playerid] == 1)
{
SetPlayerColor(playerid,YOURCOLOR2);
}
}
public OnPlayerRequestSpawn(playerid) { if(pClass[playerid] == 0) { SetPlayerColor(playerid,YOURCOLOR); } if(pClass[playerid] == 1) { SetPlayerColor(playerid,YOURCOLOR2); } return 1; }
Returns Returning 0 in this callback will prevent the player from spawning |
Originally Posted by Blantas ;P*~
Код:
public OnPlayerRequestSpawn(playerid) { if(pClass[playerid] == 0) { SetPlayerColor(playerid,YOURCOLOR); } if(pClass[playerid] == 1) { SetPlayerColor(playerid,YOURCOLOR2); } return 1; } Quote:
|