Jump to content
  • 0

Comanda Rainbowcar: nu se inchide rainbow. Ps am facut-o sa se cumpere cu PP. Va rog ajutati-ma


Question

Posted

Am o mica problema cu comanda rainbowcar. Dupa ce ii dau sa mearga rainbow cand dau a doua oara nu mai merge sa se opreasca rainbow. Ea e facuta sa o cumperi cu pp. Uitati comanda:

 pawncode:

 YCMD:rainbowcar(playerid, params[], help)
{
     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");
                KillTimer(CTimer2);
                KillTimer(CTimer3);
                 KillTimer(CTimer4);
                 KillTimer(CTimer5);
                  rainbowcar[playerid] = 1;
                CTimer1 = SetTimerEx("Color1", 500, 0, "d" ,playerid);
                 }
             }
        }
        else
           SendClientMessage(playerid, COLOR_RED, "Rainbow Car");
          {
            KillTimer(CTimer2);
            KillTimer(CTimer3);
              KillTimer(CTimer4);
             KillTimer(CTimer5);
             rainbowcar[playerid] = 1;
             CTimer1 = SetTimerEx("Color1", 500, 0, "d" ,playerid);        }
    }
    return 1;
}
public Color1(playerid)
 {
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer1);
   ChangeVehicleColor(vehicleid, 1, 1);
   CTimer2 = SetTimerEx("Color2", 500, 0, "d" ,playerid);
}

public Color2(playerid)
{
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer2);
   ChangeVehicleColor(vehicleid, 2, 2);
   CTimer3 = SetTimerEx("Color3", 500, 0, "d" ,playerid);
}

 public Color3(playerid)
 {
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer3);
    ChangeVehicleColor(vehicleid, 3, 3);
   CTimer4 = SetTimerEx("Color4", 500, 0, "d", playerid);
}

 public Color4(playerid)
{
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer4);
   ChangeVehicleColor(vehicleid, 4, 4);
   CTimer5 = SetTimerEx("Color5", 500, 0, "d" ,playerid);
}

public Color5(playerid)
 {
   new vehicleid = GetPlayerVehicleID(playerid);
    KillTimer(CTimer5);
   ChangeVehicleColor(vehicleid, 5, 5);
   SetTimerEx("Color1", 500, 0, "d" ,playerid);
}

 pawncode.

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

4 answers to this question

Recommended Posts

  • 0
Posted

Pls ajutati-ma!

 

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

  • 0
Posted
On 3/14/2019 at 4:31 PM, AndyAdv said:

Pls ajutati-ma!

 

Salut!

Am vazut in comanda ta ca folosesti funcția rainbowcar[playerid], poti sa te folosesti de această funcție pentru a stopa cealaltă comanda, spre exemplu:

CMD:stoprainbow(playerid,params......)

{

if (rainbowcar[playerid] == 1 || CarInfo[carid][cRainbowC] == 1)

{

CTimer1 = SetTimerEx("color", 1000,false, "i", playerid); 

KillTimer(CTimer1);

rainbowcar[playerid] = 0;

SendClientMessage(... mesaj);

}

return 1;

}

Sper sa iti functioneze, teoretic ar trebui să funcționeze.

  • 0
Posted

Pune la    

 

public OnPlayerExitVehicle(playerid, vehicleid)

    if(rainbowcar[playerid] == 1)
    {
        rainbowcar[playerid] = 0;
    } 

 

 

(asa cand vei iesi din vehicul  modul rainbow se va opri automat)

  • 0
Posted

Multumesc frumos!

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.