Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- 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, "Tu doit être dans un véhicule!" );
- if(RainBow[playerid] == 0)
- {
- SendClientMessage(playerid, -1, "RainBow activé");
- RainBowColor(playerid);
- RainBow[playerid] = 1;
- }
- else
- {
- SendClientMessage(playerid, -1, "Rainbow désactivé");
- KillTimer(RainBowColor1);
- RainBow[playerid] = 0;
- }
- return 1;
- }
- return 0;
- }
- public RainBowColor(playerid)
- {
- new Couleur = random(255) + 1;
- new vehicleid = GetPlayerVehicleID(playerid);
- ChangeVehicleColor(vehicleid, Couleur, Couleur);
- RainBowColor1 = SetTimerEx("RainBowColor", 500, 0, "d" ,playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment