Jump to content
  • 1

Problema job


KAPSu

Question

De curand am pus pe server-ul meu job-ul Courier si vreau sa poate sa intre in masina doar daca scrie /courier , va dau si comanda de acum:

[pawn]if (strcmp("/courier", cmdtext, true, 10) == 0)

    {

        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499)

        {

            JobStatus[playerid] = 1;

            TruckingJob[playerid] = 1;

            SetPlayerCheckpoint(playerid,1110.5992,-1327.9216,13.7145,10);

            new name[MAX_PLAYER_NAME], string[48];

            GetPlayerName(playerid, name, sizeof(name));

            format(string, sizeof(string), "* %s is now a Courier.", name );

            SendClientMessageToAll(COLOR_YELLOW, string);

            return 1;

        }

        SendClientMessage(playerid, COLOR_RED,"You have to be in a courier truck to start the job");

    }

    return 0;

}[/pawn]

Cel din urma va fi cel dintâi.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Spune-ne ce vr sa stii.

A zis ce vrea sa stie, daca citeai si tu cu atentie.

mda asa ramane:))

Nu stiu de ce mai postezi daca nu sti, doar sa faci posturi...

Uite aici: Te duci la OnPlayerStateChange si faci ceva de genu:

    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(vehicleid == ID-U Masini .... etc)
        {
                if(JobStatus[playerid] == 0)
                {
                        RemovePlayerFromVehicle(playerid);
                        SendClientMessage(playerid, COLOR_GREEN, "Nu te poti urca !");
                        return 1;
                }
        }
    }

i0418xcttya707ofg.jpg

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.