Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:rainbowcar(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "This is not your pernosal car");
- {
- if(rainbowcar[playerid] == 0)
- {
- new getcarid = GetPlayerVehicleID(playerid);
- {
- new carid = PlayerInfo[playerid][pCarKey];
- if(CarInfo[carid][cRainbowC] == 0) return SendClientMessage(playerid, COLOR_WHITE,"This vehicle aren't rainbow color.");
- {
- SendClientMessage(playerid, COLOR_RED, "Rainbow Car has been turned on.");
- KillTimer(CTimer1);
- rainbowcar[playerid] = 1;
- CTimer1 = SetTimerEx("Color1", 500, 0, "d" ,playerid);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Rainbow Car has been turned off.");
- KillTimer(CTimer1);
- rainbowcar[playerid] = 0;
- }
- }
- return 1;
- }
- new rainbowcar[MAX_PLAYERS],
- CTimer1;
- la cinfo cRainbowC,
- onplayerconnect rainbowcar[playerid] = 0;
- \
- onplayerexitvehicle
- if(rainbowcar[playerid] == 1)
- {
- rainbowcar[playerid] = 0;
- }
- la /v
- case 10: {
- if(PlayerInfo[playerid][pPremiumPoints] < 100) return SCM(playerid, -1, "Nu ai destule puncte premium.");
- new carid = PlayerInfo[playerid][pCarKey];
- if(CarInfo[carid][cRainbowC] > 0) return SendClientMessage(playerid, COLOR_WHITE,"This vehicle already rainbow color.");
- CarInfo[carid][cRainbowC] = 1;
- new string2[184];
- mysql_format(SQL, string2, sizeof(string2), "UPDATE cars SET `RainbowC`='1' WHERE `ID`='%d'",CarInfo[carid][cID]);
- mysql_tquery(SQL,string2,"","");
- SCM(playerid, -1, "To enable, type /rainbowcar and to disable type /rainbowcar");
- PlayerInfo[playerid][pPremiumPoints] -= 100;
- Update(playerid, pPremiumPointsx);
- SendClientMessage(playerid, COLOR_YELLOW, "You upgraded this vehicle to rainbow color.(-100 pp)");
- }
- loadcar cache_get_field_content(i, "RainbowC", CarInfo[id][cRainbowC], SQL, 130);
- CarInfo[id][cRainbowC] = cache_get_field_content_int(i, "RainbowC");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement