Jump to content
  • 0

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


AndyAdv

Question

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;
}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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;
}

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0

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)

Link to comment
Share on other sites

  • 0

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;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.