[HELP]Player Colour and Pickup - 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]Player Colour and Pickup (
/showthread.php?tid=118688)
[HELP]Player Colour and Pickup -
JetfighterV - 04.01.2010
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
Re: [HELP]Player Colour and Pickup -
Correlli - 04.01.2010
Em, can you try to explain a bit better?
Re: [HELP]Player Colour and Pickup -
Andy_McKinley - 04.01.2010
He means how to set player name (tag) colour and create pick-ups.
Re: [HELP]Player Colour and Pickup -
JetfighterV - 04.01.2010
I want emitted when a man dies his arms and money as a pickup | And that when they choose the skin would be the color of the skin
Re: [HELP]Player Colour and Pickup -
SiJ - 05.01.2010
Quote:
Originally Posted by Seif_
|
We told him to go to Scripting Discussion with this quostion cause nobody helps in Lithuanian forums..
What he means is when he dies he wants to have weapons and money dropped as pickups..
And the answer to "And that when they choose the skin would be the color of the skin" is:
pawn Код:
#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);
}
}
That's it I think.. :P
Re: [HELP]Player Colour and Pickup -
JetfighterV - 05.01.2010
Well done but then nothing does not hold when I click spawn
Re: [HELP]Player Colour and Pickup -
Blantas - 05.01.2010
Sorry for doubleposting. :>
Re: [HELP]Player Colour and Pickup -
Blantas - 05.01.2010
Код:
public OnPlayerRequestSpawn(playerid)
{
if(pClass[playerid] == 0)
{
SetPlayerColor(playerid,YOURCOLOR);
}
if(pClass[playerid] == 1)
{
SetPlayerColor(playerid,YOURCOLOR2);
}
return 1;
}
Quote:
Returns Returning 0 in this callback will prevent the player from spawning
|
Re: [HELP]Player Colour and Pickup -
SiJ - 05.01.2010
Quote:
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:
Returns Returning 0 in this callback will prevent the player from spawning
|
|
Oops.. I forgot to return 1;
There should be return 1; on public OnGameModeInit and OnPlayerRequestClass
Re: [HELP]Player Colour and Pickup -
JetfighterV - 05.01.2010
it's a not work