Jump to content
  • 0

Problema checkpoint


Question

Posted
  1. Problemă:Deci am adaugat un job de curier si am scris comanda si ma trimite la cp asta si dupa ce intru dispare si nu se mai intampla nimic
  2. Ce ai încercat să faci:sa trec tot de la job 
  3. Erori/atentionari:nici o eroare 
  4. Cod sursă:CMD:loadtruck(playerid, params[]) {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pJob] != 19)
    {
    return SendClientMessage(playerid, COLOR_GRAD2," You're not a trucker!");
    }
    if(!(GetPlayerVehicleID(playerid) >= Trucks[0] && GetPlayerVehicleID(playerid) <= Trucks[7]))
    {
    return SendClientMessage(playerid, COLOR_GRAD2," You're not in a truck!");
    }
    if(CP[playerid] != 0)
    {
    return SendClientMessage(playerid, COLOR_GRAD2," You already have an active checkpoint !");
    }
    SendClientMessage(playerid, COLOR_YELLOW,"< Truck Radio : Take the Truck to the Loading-Bay Point to start your Delivery >");
    SetPlayerCheckpoint(playerid, 1751.2222,-2058.7874,13.5904,3.0);
    CP[playerid] = 1348;
    }
    return 1;
    }

     
  5. Imagini:imgur.com/a/GQe9W
  6. Precizări:Ms

3 answers to this question

Recommended Posts

  • 0
Posted

Salut!

La OnPlayerEnterCheckpoint functia id-ul cp-ului (1348) ce functie i-ai dat sa aiba?Adica ma refer cand cauti CP[playerid] = 1348; ce iti da inafara de cel de la comanda?

 

 

  • 0
Posted

Si de ce crezi ca nu iti da ce doresti dupa ce intrii in cp?

 

Pentru ca nu ai facut restrictionare cand playerul intra in cp sa ii dea bani sau ceva de genul...Uite aici un exemplu.

 

La onplayerentercheckpoint adaugi:

if(CP[playerid] == 1348)
    {
                DisablePlayerCheckpoint(playerid);
				GivePlayerMoney(playerid, 2500);// 2500 - banii pe care ii primeste
				SendClientMessage(playerid, -1, "Mesajul tau!");
                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.