Jump to content
  • 0

problema /collecttrash


Woody

Question

Am si eu comanda /collecttrash pentru Garbage cand ma urc in masina, problema este ca, imi apare de fiecaredata cand ma urc in masina dupa ce am folosit-o odata (iar eu nu am terminat job-ul de facut) si este nevoie sa cobor mereu pentru a ridica gunoiul. As dori sa fac sa nu imi apara de fiecare data sa folosesc comanda. Uitati o poza. http://imgur.com/pe8TqEp

 

Comanda

 

        if(vehicleVariables[newcar][vVehicleJob] == 9 && playerVariables[playerid][pJob] == 9)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Use /collecttrash to start your job.");
        }
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
if(vehicleVariables[newcar][vVehicleJob] == 9 && playerVariables[playerid][pJob] == 9 && work[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Use /collecttrash to start your job.");
        }

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

  • 0
Acum 1 oră, Gireada a spus:

Pai arata-ne toata comanda, caci cu ce ne-ai dat tu, nu te putem ajuta.

CMD:collecttrash(playerid,params[])
{
    new newcar = GetPlayerVehicleID(playerid);
    if(vehicleVariables[newcar][vVehicleJob] == 9 && playerVariables[playerid][pJob] == 9)
    {
            SetPlayerCheckpoint(playerid, 2196.4490,-1977.1947,13.5527, 2.0);
            CP[playerid] = 1500;
            playerVariables[playerid][pTRoute] = 1;
            SendClientMessage(playerid, COLOR_WHITE,"{FFEE00}INFORMATII JOB: {FFFFFF}Te rog, mergi la checkpoint-ul pus pe harta pentru a putea incepe munca.");
    }
    else SendClientMessage(playerid, COLOR_WHITE,"You are not a garbage man or you aren't in a Trashmaster.");
    return 1;
}

iar asta imi apare cand ma urc in masina de fiecare data

 

    if(vehicleVariables[newcar][vVehicleJob] == 9 && playerVariables[playerid][pJob] == 9)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Use /collecttrash to start your job.");
        }
Edited by Woody
Link to comment
Share on other sites

  • 0
if((vehicleVariables[newcar][vVehicleJob] == 9 && playerVariables[playerid][pJob] == 9)&& work == 0)
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Use /collecttrash to start your job.");
        }

variabila work o faci globala si cand folosesti /collecttrash sa devina 1. 

Link to comment
Share on other sites

  • 0
CMD:collecttrash(playerid,params[])
{
    new newcar = GetPlayerVehicleID(playerid);
    if(vehicleVariables[newcar][vVehicleJob] == 9 && playerVariables[playerid][pJob] == 9)
    {
            SetPlayerCheckpoint(playerid, 2196.4490,-1977.1947,13.5527, 2.0);
            CP[playerid] = 1500;
            playerVariables[playerid][pTRoute] = 1;
            SendClientMessage(playerid, COLOR_WHITE,"{FFEE00}INFORMATII JOB: {FFFFFF}Te rog, mergi la checkpoint-ul pus pe harta pentru a putea incepe munca.");
			work[playerid] = 1;
    }
    else SendClientMessage(playerid, COLOR_WHITE,"You are not a garbage man or you aren't in a Trashmaster.");
    return 1;
}

Cauti unde ai definit variabila work si o faci work[MAX_PLAYERS], iar la terminarea jobului pui work[playerid] = 0; . Iar peste tot unde ai work pui work[playerid] .

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

  • 0

Am pus si degeaba, nu am definita variabila work nicaieri, am definit-o eu pentru job-ul Garbage cu new work[MAX_PLAYERS], la comanda /collecttrash am pus cum ai pus tu, la terminarea job-ului am pus in felul urmator: 

    if(CP[playerid] == 1503)
    {
        new playerstate = GetPlayerState(playerid);
        if (playerstate == PLAYER_STATE_DRIVER)
        {
            DisablePlayerCheckpoint(playerid);
            new cash = random(20000) + 25000;
            format(szMessage, sizeof(szMessage),"INFORMATII JOB: Ai primit %s$ pentru munca depusa astazi. Felicitari, te mai asteptam!", NumberFormat(cash));
            SendClientMessage(playerid, COLOR_ATTACK, szMessage);
            work[playerid] = 0;
            playerVariables[playerid][pTrash] = 0;
            playerVariables[playerid][pTRoute] = 0;
            playerVariables[playerid][pMoney] += cash;
            SetVehicleToRespawnEx(GetPlayerVehicleID(playerid));
            CP[playerid] = 0;
            return 1;
        }
        else
        {
            SetPlayerCheckpoint(playerid, 2196.4490,-1977.1947,13.5527, 3.0);
        }
    }

dar tot imi apare.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.