Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- v_Coordinates
- by: Vanilla
- v0.1
- Creditsi -> Gagi - Pomoć oko malog warninga <3
- Joey_ - Ideja!!! <3
- Vanilla - Izrada Filterskripte
- Ko makne creditse, ćelava mu majka!
- http://www.youtube.com/watch?v=5ds7oE1GAgw
- */
- #include <a_samp>
- #include <zcmd>
- new Aktiviran[MAX_PLAYERS];
- new TP[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\nCoordinate Get by Vanilla\n");
- return 1;
- }
- main()
- {
- print("\nCoordinate Get by Vanilla\n");
- }
- public OnPlayerConnect(playerid)
- {
- Aktiviran[playerid] = 0;
- TP[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- Aktiviran[playerid] = 0;
- TP[playerid] = 0;
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- if(Aktiviran[playerid] == 1)
- {
- SetPlayerPosFindZ(playerid, fX, fY, fZ);
- SpremiKoordinate(fX,fY,fZ);
- }
- if(TP[playerid] == 1)
- {
- SetPlayerPosFindZ(playerid, fX, fY, fZ);
- SetPlayerPos(playerid,fX,fY,fZ);
- }
- return 1;
- }
- CMD:cg(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON Administrator!");
- if(Aktiviran[playerid] == 1)
- {
- Aktiviran[playerid] = 0;
- SendClientMessage(playerid, -1, "Ugasili ste Coordinate Get mogucnost!");
- }
- else
- {
- Aktiviran[playerid] = 1;
- SendClientMessage(playerid, -1, "Upalili ste Coordinate Get mogucnost!");
- }
- return true;
- }
- CMD:tpa(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON Administrator!");
- if(TP[playerid] == 1)
- {
- TP[playerid] = 0;
- SendClientMessage(playerid, -1, "Ugasili ste mogucnost teleportiranja po mapi!");
- }
- else
- {
- TP[playerid] = 1;
- SendClientMessage(playerid, -1, "Upalili ste mogucnost teleportiranja po mapi");
- }
- return true;
- }
- stock SpremiKoordinate(Float:fX,Float:fY,Float:fZ)
- {
- new string[64];
- format(string,sizeof(string),"%f,%f,%f\n",fX,fY,fZ);
- new File:hFile;
- hFile = fopen("Koordinate.txt", io_append);
- fwrite(hFile, string);
- fclose(hFile);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement