Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- // GPS Sistem / Andrijevic
- // Verzija: 1.0
- //==============================================================================
- //============================= [ INCLUDE ] ====================================
- #include <a_samp>
- #include <zcmd>
- //============================= [ DEFINE ] =====================================
- #define SCM SendClientMessage
- #define COLOR_RED 0xAA3333AA
- #define COL_RED "{F81414}"
- #define COLOR_YELLOW 0xDABB3EAA
- #define COL_YELLOW "{F3FF02}"
- #define GPSDIALOG 1
- new use_gps[MAX_PLAYERS];
- //==============================================================================
- public OnFilterScriptInit() { print("GPS sistem ucitan."); return true; }
- public OnFilterScriptExit() { print("GPS sistem iskljucen."); return true; }
- CMD:gps(playerid, params[])
- {
- if(!IsPlayerDriver(playerid)) return SCM(playerid,COLOR_RED,"[GPS]:"#COL_YELLOW" Morate biti u vozilu!");
- ShowPlayerDialog(playerid,GPSDIALOG,DIALOG_STYLE_LIST ,"| GPS sistem |","Glavni Burg\nPD\nAutoSalon Grotti\n24/7 Prodavnica\nGun Shop\nBolnica\nBanka","Odaberi","Odustani");
- return true;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == GPSDIALOG)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- use_gps[playerid] = 1;
- SetPlayerCheckpoint(playerid,1315.6443,-904.2128,38.9331,3.0);
- SendClientMessage(playerid, COLOR_RED, "[GPS]:"#COL_YELLOW" Namestili ste vašu GPS lokaciju na "#COL_RED"Glavni Burg"#COL_YELLOW"! ");
- }
- case 1:
- {
- use_gps[playerid] = 1;
- SetPlayerCheckpoint(playerid,1553.7538,-1675.4840,16.1953,3.0);
- SendClientMessage(playerid, COLOR_RED, "[GPS]:"#COL_YELLOW" Namestili ste vašu GPS lokaciju na "#COL_RED"PD"#COL_YELLOW"!");
- }
- case 2:
- {
- use_gps[playerid] = 1;
- SetPlayerCheckpoint(playerid,556.7983,-1255.9104,17.0702,3.0);
- SendClientMessage(playerid, COLOR_RED, "[GPS]:"#COL_YELLOW" Namestili ste vašu GPS lokaciju na "#COL_RED"AutoSalon Grotti"#COL_YELLOW"!");
- }
- case 3:
- {
- use_gps[playerid] = 1;
- SetPlayerCheckpoint(playerid,1315.6443,-904.2128,38.9331,3.0);
- SendClientMessage(playerid, COLOR_RED, "[GPS]:"#COL_YELLOW" Namestili ste vašu GPS lokaciju na "#COL_RED"24/7 Prodavnicu"#COL_YELLOW"!");
- }
- case 4:
- {
- use_gps[playerid] = 1;
- SetPlayerCheckpoint(playerid,1365.0654,-1279.8607,13.5469,3.0);
- SendClientMessage(playerid, COLOR_RED, "[GPS]:"#COL_YELLOW" Namestili ste vašu GPS lokaciju na "#COL_RED"Gun Shop"#COL_YELLOW"!");
- }
- case 5:
- {
- use_gps[playerid] = 1;
- SetPlayerCheckpoint(playerid,1172.8307,-1323.3011,15.4001,3.0);
- SendClientMessage(playerid, COLOR_RED, "[GPS]:"#COL_YELLOW" Namestili ste vašu GPS lokaciju na "#COL_RED"Bolnica"#COL_YELLOW"!");
- }
- case 6:
- {
- use_gps[playerid] = 1;
- SetPlayerCheckpoint(playerid,1462.0543,-1011.3368,26.8438,3.0);
- SendClientMessage(playerid, COLOR_RED, "[GPS]:"#COL_YELLOW" Namestili ste vašu GPS lokaciju na "#COL_RED"Banku"#COL_YELLOW"!");
- }
- }
- }
- }
- return true;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(use_gps[playerid] == 1)
- {
- DisablePlayerCheckpoint(playerid);
- }
- return true;
- }
- stock IsPlayerDriver(playerid)
- {
- if(IsPlayerConnected(playerid) && GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
- {
- return true;
- }
- return false;
- }
- //==============================================================================
- // KRAJ SKRIPTE - ANDRIJEVIC
- // BICE UPDATE - ANDRIJEVIC
- // NOVE LOKACIJE I SVASTA NESTP
Advertisement
Add Comment
Please, Sign In to add comment