[HELP] Car Colors - 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] Car Colors (
/showthread.php?tid=95703)
[HELP] Car Colors -
[KaE]Cartman - 04.09.2009
We all know that the colors of the vehicles going up to 126, but discovered new colors to the 252, but has many blacks in the middle of these new colors, there are some means of removing the IDS black in this random command:
pawn Код:
CarColor(playerid)
{
if (IsPlayerInAnyVehicle(playerid))
{
new rand = random(252)+0;
new rand1 = random(252)+0;
new iVehicleID = GetPlayerVehicleID(playerid);
ChangeVehicleColor(iVehicleID,rand,rand1);
//PlaySoundForPlayer(playerid, vr);
}
else
{
SendClientMessage(playerid,COR_VERMELHO,"[ERRO] Vocк nгo estб em um veнculo");
PlaySoundForPlayer(playerid, erro);
}
return 1;
}
thx for help!
My english sucks, sorry.
Re: [HELP] Car Colors -
[KaE]Cartman - 04.09.2009
Any idea dudes?
Re: [HELP] Car Colors -
[KaE]Cartman - 04.09.2009
Really dudes, any idea? i have no new idea for this.
help-me plz!
Re: [HELP] Car Colors -
Clavius - 05.09.2009
You will have to check each color, and if you don't want some of them, add them to the script like this:
if (rand == 175 || rand == 199 || rand == 12

ofc those above are just example numbers.