Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Textdraw Gps by Hitman
- #include <a_samp>
- #include <zcmd>
- new Text:GPSLOGO;
- new Text:OD;
- new Text:GPSBANKA;
- new Text:GPSBURG;
- new Text:GPSPD;
- new Text:GPSMD;
- #define SCM SendClientMessage
- #pragma tabsize 0
- public OnFilterScriptInit()
- {
- GPSLOGO = TextDrawCreate(500.000000, 102.000000, " GPS");
- TextDrawBackgroundColor(GPSLOGO, 255);
- TextDrawFont(GPSLOGO, 2);
- TextDrawLetterSize(GPSLOGO, 0.280000, 1.300000);
- TextDrawColor(GPSLOGO, -1);
- TextDrawSetOutline(GPSLOGO, 0);
- TextDrawSetProportional(GPSLOGO, 1);
- TextDrawSetShadow(GPSLOGO, 1);
- TextDrawUseBox(GPSLOGO, 1);
- TextDrawBoxColor(GPSLOGO, 255);
- TextDrawTextSize(GPSLOGO, 586.000000, 12.000000);
- OD = TextDrawCreate(500.000000, 118.000000, " ODABERITE DESTINACIJU");
- TextDrawBackgroundColor(OD, 255);
- TextDrawFont(OD, 1);
- TextDrawLetterSize(OD, 0.190000, 0.799999);
- TextDrawColor(OD, -1);
- TextDrawSetOutline(OD, 0);
- TextDrawSetProportional(OD, 1);
- TextDrawSetShadow(OD, 1);
- TextDrawUseBox(OD, 1);
- TextDrawBoxColor(OD, 255);
- TextDrawTextSize(OD, 586.000000, 12.000000);
- GPSBANKA = TextDrawCreate(500.000000, 132.000000, " GPS-BANKA");
- TextDrawBackgroundColor(GPSBANKA, 255);
- TextDrawFont(GPSBANKA, 2);
- TextDrawLetterSize(GPSBANKA, 0.280000, 1.300000);
- TextDrawColor(GPSBANKA, -1);
- TextDrawSetOutline(GPSBANKA, 0);
- TextDrawSetProportional(GPSBANKA, 1);
- TextDrawSetShadow(GPSBANKA, 1);
- TextDrawUseBox(GPSBANKA, 1);
- TextDrawBoxColor(GPSBANKA, 255);
- TextDrawTextSize(GPSBANKA, 586.000000, 12.000000);
- GPSBURG = TextDrawCreate(500.000000, 149.000000, " GPS-BURG");
- TextDrawBackgroundColor(GPSBURG, 255);
- TextDrawFont(GPSBURG, 2);
- TextDrawLetterSize(GPSBURG, 0.280000, 1.300000);
- TextDrawColor(GPSBURG, -1);
- TextDrawSetOutline(GPSBURG, 0);
- TextDrawSetProportional(GPSBURG, 1);
- TextDrawSetShadow(GPSBURG, 1);
- TextDrawUseBox(GPSBURG, 1);
- TextDrawBoxColor(GPSBURG, 255);
- TextDrawTextSize(GPSBURG, 586.000000, 12.000000);
- GPSPD = TextDrawCreate(500.000000, 166.000000, " GPS-PD");
- TextDrawBackgroundColor(GPSPD, 255);
- TextDrawFont(GPSPD, 2);
- TextDrawLetterSize(GPSPD, 0.280000, 1.300000);
- TextDrawColor(GPSPD, -1);
- TextDrawSetOutline(GPSPD, 0);
- TextDrawSetProportional(GPSPD, 1);
- TextDrawSetShadow(GPSPD, 1);
- TextDrawUseBox(GPSPD, 1);
- TextDrawBoxColor(GPSPD, 255);
- TextDrawTextSize(GPSPD, 586.000000, 12.000000);
- GPSMD = TextDrawCreate(500.000000, 183.000000, " GPS-MD");
- TextDrawBackgroundColor(GPSMD, 255);
- TextDrawFont(GPSMD, 2);
- TextDrawLetterSize(GPSMD, 0.280000, 1.300000);
- TextDrawColor(GPSMD, -1);
- TextDrawSetOutline(GPSMD, 0);
- TextDrawSetProportional(GPSMD, 1);
- TextDrawSetShadow(GPSMD, 1);
- TextDrawUseBox(GPSMD, 1);
- TextDrawBoxColor(GPSMD, 255);
- TextDrawTextSize(GPSMD, 586.000000, 12.000000);
- TextDrawSetSelectable(GPSBANKA, true);
- TextDrawSetSelectable(GPSBURG, true);
- TextDrawSetSelectable(GPSPD, true);
- TextDrawSetSelectable(GPSMD, true);
- TextDrawSetSelectable(GPSLOGO, false);
- TextDrawSetSelectable(OD, false);
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawDestroy(GPSLOGO);
- TextDrawDestroy(OD);
- TextDrawDestroy(GPSBURG);
- TextDrawDestroy(GPSBANKA);
- TextDrawDestroy(GPSPD);
- TextDrawDestroy(GPSMD);
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,0xA3B4C5FF,"Niste u vozilu!");
- PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- if(_:clickedid != 65535)
- {
- if(clickedid == GPSBURG)
- {
- GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
- SetPlayerCheckpoint(playerid,1191.1787,-919.2334,43.2090,3.0);
- PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
- }
- else if(clickedid == GPSBANKA)
- {
- GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
- SetPlayerCheckpoint(playerid,1456.9436,-1025.7076,23.8281,3.0);
- PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
- }
- else if(clickedid == GPSPD)
- {
- GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
- SetPlayerCheckpoint(playerid,1537.3986,-1658.6750,13.5469,3.0);
- PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
- }
- else if(clickedid == GPSMD)
- {
- GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
- SetPlayerCheckpoint(playerid,1187.3979,-1313.3105,13.5643,3.0);
- PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
- }
- TextDrawHideForPlayer(playerid, GPSLOGO);
- TextDrawHideForPlayer(playerid, OD);
- TextDrawHideForPlayer(playerid, GPSBURG);
- TextDrawHideForPlayer(playerid, GPSBANKA);
- TextDrawHideForPlayer(playerid, GPSPD);
- TextDrawHideForPlayer(playerid, GPSMD);
- CancelSelectTextDraw(playerid);
- }
- return 1;
- }
- /*KOMANDE*/
- CMD:gps(playerid, params[])
- {
- if(IsPlayerConnected(playerid)) {
- if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,0xA3B4C5FF,"Niste u vozilu!");
- TextDrawShowForPlayer(playerid, GPSLOGO);
- TextDrawShowForPlayer(playerid, OD);
- TextDrawShowForPlayer(playerid, GPSBURG);
- TextDrawShowForPlayer(playerid, GPSBANKA);
- TextDrawShowForPlayer(playerid, GPSPD);
- TextDrawShowForPlayer(playerid, GPSMD);
- SelectTextDraw(playerid, 0xA3B4C5FF); }
- return 1;
- }
- CMD:gpsoff(playerid, params[])
- {
- if(IsPlayerConnected(playerid)) {
- if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,0xA3B4C5FF,"Niste u vozilu!");
- PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
- DisablePlayerCheckpoint(playerid); }
- SendClientMessage(playerid,0xA3B4C5FF,"Isključili ste GPS u vozilu!");
- return 1;
- }
- ///////////////////////////////////////////////////////////////////////////// KRAJ //////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement