Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- _ ___ _____ _____ _____ __ _ __ __
- | | / | | _ \ / ___| | ____| | \ | | \ \ / /
- | | / /| | | |_| | | | | |__ | \| | \ \/ /
- | | / / | | | _ / | | | __| | |\ | \ /
- | |___ / / | | | | \ \ | |___ | |___ | | \ | / /
- |_____| /_/ |_| |_| \_\ \_____| |_____| |_| \_| /_/
- |¯| /¯\ |¯\ /¯\ |¯|
- |¯\ |¯| |_/ |¯| |¯\
- */
- //Special Thanks to: ([VGS]PROTIOSO_OC)
- #include "LSR"
- #include "PGD"
- new radartest;
- public OnFilterScriptInit()
- {
- print("[LSR:] Radar Creator Loaded.");
- UseFlashRadar();
- CreateRadar(1257.644287, -1332.972900, 12.756792, 20, 50, 0, 1);//bugged
- radartest = CreateRadar(1194.994995, -1279.451416, 13.152740, 20, 50, 1318, 1);//near general hospital
- CreateRadar(1057.763549, -1366.322143, 13.189699, 20, 50, 1318, 1);//behind general hospital
- return 1;
- }
- public OnPlayerEnterRadar(playerid, speed, radarid)
- {
- new string[128];
- if(radarid == radartest){format(string, sizeof(string), "[LSR:] You passed in my radar at %d km/h and lost $500.", speed);}
- else {format(string, sizeof(string), "[LSR:] You passed in any radar at %d km/h and lost $500.", speed);}
- SendClientMessage(playerid, 0xA9C4E4FF, string);
- GivePlayerMoney(playerid, -500);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new idx, cmd[MAX_psf_strtok], comment[MAX_psf_strtok];
- cmd = psf_strtok(cmdtext, idx);
- if(!strcmp(cmd, "/saveradar", true))
- {
- cmd = psf_strtok(cmdtext, idx);
- new speed;
- speed = strval(cmd);
- cmd = psf_strtok(cmdtext, idx);
- new radiation;
- radiation = strval(cmd);
- comment = psf_strtok(cmdtext, idx);
- if(!strlen(cmd)) return SendClientMessage(playerid, 0xAA3333AA, "[LSR:] /saveradar [speed limit] [radiation (default 20)] [comment]");
- if(!strlen(cmd)) return SendClientMessage(playerid, 0xAA3333AA, "[LSR:] /saveradar [speed limit] [radiation (default 20)] [comment]");
- if(!strlen(cmd)) return SendClientMessage(playerid, 0xAA3333AA, "[LSR:] /saveradar [speed limit] [radiation (default 20)] [comment]");
- new Float:X, Float:Y, Float:Z, strf[128];
- GetPlayerPos(playerid, X, Y, Z);
- format(strf, sizeof(strf), "CreateRadar(%f, %f, %f, %d, %d, 1318, 1);//%s\r\n", X, Y, Z, radiation, cmd, comment);
- pgd_EscreverArquivo("saved_radars.txt", strf); // write to the file saved_radars.txt
- CreateRadar(X, Y, Z, speed, radiation, 1318, 1); // create a radar
- SendClientMessage(playerid, 0x33AA33AA, "[LSR:] Radar saved!");
- return 1;
- }
- if(!strcmp(cmd, "/credits", true))
- {
- SendClientMessage(playerid, 0x33AA33AA, "Radars script.");
- SendClientMessage(playerid, 0x33AA33AA, "Author: Larceny");
- SendClientMessage(playerid, 0x33AA33AA, "lcsdegodoy@gmail.com");
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement