Advertisement
Guest User

rainbow v2 si dalea.

a guest
Mar 2nd, 2019
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. // adaugam asta la sfarsit-ul gamemode-ului.
  2.  
  3. new TimerRainBow[MAX_PLAYERS];
  4.  
  5. // avem nevoie de comanda aceasta, probabil intelegeti ce este acolo si daca sunteti incepator, nu trebuie sa explic chiar totul.
  6. CMD:rainbowspeed(playerid, params[]){
  7. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  8. if(PlayerInfo[playerid][pVipAccount] == 0 && PlayerInfo[playerid][pAdmin] == 0) return 1;
  9. //if(CarInfo[carid][cVip] < 1) return SendClientMessage(playerid, COLOR_WHITE,"(Error): This vehicle is not VIP.");
  10. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, -1, "(RainBow): Nu esti intr-un vehicul!");
  11. KillTimer(TimerRainBow[playerid]);
  12. TimerRainBow[playerid] = SetTimerEx("RainbowChange", 1000, true, "i", playerid);
  13. new string[128];
  14. format(string, sizeof(string), "(VIPBot): %s a pornit RainBow-ul.",GetName(playerid));
  15. ABroadCast(COLOR_ADMCHAT, string,1);
  16. return 1;
  17. }
  18. // Acum ne trebuie comana /rainbowspeedoff.
  19. CMD:rainbowspeedoff(playerid, params[]){
  20. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  21. KillTimer(TimerRainBow[playerid]);
  22. SCM(playerid, COLOR_YELLOW, "(RainBow): Ai oprit rainbow!");
  23. return 1;
  24. }
  25. // avem nevoie de aceasta functie pentru a da culoare random 0-255.
  26. function RainbowChange(playerid){
  27. if(IsPlayerInAnyVehicle(playerid)){
  28. new c1 = random(255), c2= random (255);
  29. ChangeVehicleColor(GetPlayerVehicleID(playerid), c1, c2);
  30. }
  31. return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement