SA-MP Forums Archive
[FilterScript] [CCC] (RainBow) ChangeCarColor - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [CCC] (RainBow) ChangeCarColor (/showthread.php?tid=514059)



[CCC] (RainBow) ChangeCarColor - Chris53340 - 19.05.2014

ChangeCarColor

Код:
Objective Change the color of the vehicle randomly.
Код:
List of available commands /rainbow : Enables or disables the effect of color change.
Video

[ame]http://www.youtube.com/watch?v=v4QTPUxcU6Y[/ame]
Download


Ce script est mis а disposition selon les termes de la licence
Creative Commons Attribution - Pas d'Utilisation Commerciale - Pas de Modification 4.0 International





Re: [CCC] (RainBow) ChangeCarColor - JonathanW - 19.05.2014

Good work!


Re: [CCC] (RainBow) ChangeCarColor - Gasartobi - 19.05.2014

Add pic'please


Re : [CCC] (RainBow) ChangeCarColor - Chris53340 - 19.05.2014

Pictures Added, i upload a video.


Re: [CCC] (RainBow) ChangeCarColor - Hwang - 19.05.2014

Good work.


Re : [CCC] (RainBow) ChangeCarColor - Chris53340 - 19.05.2014

Vidйo added. Thanks, +rep


Re: [CCC] (RainBow) ChangeCarColor - PT - 19.05.2014

its a good idea but you can improve that.

look:

pawn Код:
/*
Fait par Christopher # Kiki_Readon # Kiki53
CCC [ChangeCarColor]
*/

 
#include <a_samp>
 
forward RainBowColor(playerid);
 
new RainBowColor1;
new RainBow[MAX_PLAYERS];
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/rainbow", true) == 0)
    {
        if( !IsPlayerInAnyVehicle( playerid ) )
            return SendClientMessage( playerid, -1, "Not such a vehicle!" );
       
        RainBow[playerid] = RainBow[playerid] == 0 ? 1 : 0;
        SendClientMessage(playerid, -1, RainBow[playerid] == 1 ? ("RainBow activated") : ("Rainbow off"));
        RainBowColor(playerid);
        return 1;
    }
    return 0;
}
public RainBowColor(playerid)
{
    if(RainBow[playerid] == 1)
    {
        ChangeVehicleColor(GetPlayerVehicleID(playerid), -1, -1);
        RainBowColor1 = SetTimerEx("RainBowColor", 500, 0, "d" ,playerid);
    }
    else KillTimer(RainBowColor1);
    return 1;
}
and can be improved more.


Re : [CCC] (RainBow) ChangeCarColor - Chris53340 - 19.05.2014

Thank you very much, I really did not know this function.