Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ----------------------------------------------------------------------------
- Arquivo: location.pwn
- Versão: 0.5
- Autor: Roger Gomes Costa 'Niko'
- Contato: roger_pca22@hotmail.com
- Stocks utilizadas: IsPlayerInArea (Y_Less)
- ----------------------------------------------------------------------------
- Atenção: se for adicionar, favor escrever corretamente. Obrigado.
- */
- #include <a_samp>
- #file "Location Filterscript 0.5"
- #define Branco
- #define Vermelho
- #define Azul
- #define Amarelo
- #define Verde
- #define Roxo
- #define Marrom
- enum Zone_Info
- {
- locationname[128],
- Float:xmin,
- Float:ymin,
- Float:xmax,
- Float:ymax
- };
- new Locations[][Zone_Info] =
- {
- {"LS - Grove Street", 2356.912, -1741.078, 2524.237, -1634.489},
- {"LS - Aeroporto", 1364.372, -2700.379, 2147.756, -2199.016},
- {"LS - Praia", 200.7038, -1914.779, 748.3121, -1768.712}
- };
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/porra", true) == 0)
- {
- new s[128];
- format(s, sizeof(s), "Sua localização: %s", GetPlayerArea(playerid));
- SendClientMessage(playerid, Roxo, s);
- return true;
- }
- return false;
- }
- stock GetPlayerArea(playerid)
- {
- new s[128] = "", Float:x, Float:y, Float:z;
- for(new i = 0; i < sizeof(Locations); i++)
- {
- if(x >= Locations[i][xmin]&& y >= Locations[i][ymin] && x <= Locations[i][xmax] && y <= Locations[i][ymax])
- {
- format(s, sizeof(s), "%s", Locations[i][locationname]);
- break;
- }
- }
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement