Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //du-te la #define si scri
- #define DIALOG_GPS 666
- //dupa la new .
- new Pass[MAX_PLAYERS];//pass == sa nu se creeze buguri .P.S Daca ai definit prin gm ceva gen "CP[playerid]" Nu mai definesti si "Pass"
- //Comanda care iti deschide un dialog cu locatiile
- CMD:gps(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST,"Gps","Banca Ls","Select","Cancel");
- return 1;
- }
- //te duci la ondialogresponse pentru a pune functie pe acel dialog.
- if(dialogid == DIALOG_GPS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- Pass[playerid] = 1;
- SetPlayerCheckpoint(plyareid, 0.0,0.0,0.0,15.0)//Pui tu coordonatele care le doresti. /save <nume> in game.
- SendClientmessage(playerid, -1,"'GPS:Ti-am pus un checkpoint pe harta.");
- }
- }
- }
- //intri in checkpoint
- //te duci la OnPlayerEnterCheckpoint(playerid) si pui asta.
- if(Pass[playerid] == 1)
- {
- DisablePlayerCheckpoint(playerid);
- Pass[playerid] = 0;
- SendClientmessage(playerid, -1, "GPS:Ai ajuns la destinatie");
- }
- //tot ce are in fata "//" poti sterge .
- //Sper ca am fost destul de explicit.
- //Daca gasesti errori posteaza-le.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement