Jump to content

Checkpoint


..H3AtonN..

Recommended Posts

Sall All,As vrea sa va rog si eu ceva... Spuneti-mi si mie:

-Cum pot sa fac un checkpoint,Dar pentru joburi,adica daca intru in el,sa-mi dea alt job.. cum e la jobul Bus Driver...

-Cum fac un checkpoint,care daca am intrat in el,sa imi dea o anumita suma de bani pusa de mine,

Stiu ca pentru unii dintre voi asta e o chiestie chiar banala,dar pentru mine e important,va rog.. un tutorial ceva.. Nu conteaza daca e in En.

 

Link to comment
Share on other sites

1.Vezi ca ai un model de respectat.

2.faci o comanda EX:

la new pui:

new CP[MAX_PLAYERS];

 

CMD:comanda(playerid, params[])

{

//x y z = coordonate, te duci unde vrei sa pui acel checkpoint si scrii in joc /save nume

//Dupa te duci in my documents samp saveposition si iei pozitiile.

SetPlayerCheckpoint(playerid, X, Y, Z, 15.0);

CP[playerid] = 1;

SCM(playerid, -1, "Ti-am pus un checkpoint pe mapa.");

       return 1;

}

 

 

te duci la onplayerentercheckpoint

si scrii asa.

if(CP[playerid] == 1)

{

DisablePlayerCheckpoint(playerid);

CP[playerid] = 0;

GivePlayerMoney(playerid, 100000);

}

 

Ti-am facut doar pentru a doua cerinta, adica cea cu money .

+1 daca ti-am fost de ajutor.

Edited by cOBRa
  • Upvote 1
Link to comment
Share on other sites

//comanda
CMD:comanda(playerid, params[])
{
    SetPlayerCheckpoint(playerid, X, Y, Z, 15.0)
    CP[playerid] = 1;
    SendClientMessage(playerid, -1, "JOB:Ai inceput munca, du-te la checkpoint.");
    return 1;
}


//onplayerentercheckpoint
if(CP[playerid] = 1)
{
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 100000);
    CP[playerid] = 0;
    SendClientMessage(playerid, -1, "JOB:Du-te la urmatorul checkpoint.");
    SetPlayerCheckpoint(playerid, x, y, z, 15.0);
    CP[playerid] = 2;
}
else if(CP[playerid] == 2)
{
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, 100000);
    CP[playerid] = 0;
    SendClientMessage(playerid, -1, "JOB:Du-te la urmatorul checkpoint.");
    CP[playerid] = 3;
    //etc cat vrei tu sa faci, eu ti-am dat doar un exemplu.
}

+1 daca ti-am fost de ajutor, daca intalnesti probleme lasa in acest topic.

//CP nu trebuie sa-l mai definesti inca o data, deoarece l-ai definit in primul tutorial.

//Acum stii ce inseamna x, y, z.

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.