Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
- /*
- [img]http://i.imgur.com/9NRbkIt.png[/img]
- [img]http://i.imgur.com/xq3FLTd.png[/img]
- [img]http://i.imgur.com/GKkOYvE.png[/img]
- [img]http://i.imgur.com/p8kGidc.png[/img]
- [img]http://i.imgur.com/QblhJgg.png[/img]
- [IMG]http://i.imgur.com/xSKhsww.png[/IMG]
- */
- #include <a_samp>
- #include <sscanf2> //http://forum.sa-mp.com/showthread.php?t=120356
- #include <zcmd> //http://forum.sa-mp.com/showthread.php?t=91354
- stock HexToInt(string[]){
- if (string[0]==0) return 0;
- new i;
- new cur=1;
- new res=0;
- for (i=strlen(string);i>0;i--) {
- if (string[i-1]<58) res=res+cur*(string[i-1]-48); else res=res+cur*(string[i-1]-65+10);
- cur=cur*16;
- }return res;
- }
- new VehicleColoursTableRGBA[256] = {
- // The existing colours from San Andreas
- 0x000000FF, 0xF5F5F5FF, 0x2A77A1FF, 0x840410FF, 0x263739FF, 0x86446EFF, 0xD78E10FF, 0x4C75B7FF, 0xBDBEC6FF, 0x5E7072FF,
- 0x46597AFF, 0x656A79FF, 0x5D7E8DFF, 0x58595AFF, 0xD6DAD6FF, 0x9CA1A3FF, 0x335F3FFF, 0x730E1AFF, 0x7B0A2AFF, 0x9F9D94FF,
- 0x3B4E78FF, 0x732E3EFF, 0x691E3BFF, 0x96918CFF, 0x515459FF, 0x3F3E45FF, 0xA5A9A7FF, 0x635C5AFF, 0x3D4A68FF, 0x979592FF,
- 0x421F21FF, 0x5F272BFF, 0x8494ABFF, 0x767B7CFF, 0x646464FF, 0x5A5752FF, 0x252527FF, 0x2D3A35FF, 0x93A396FF, 0x6D7A88FF,
- 0x221918FF, 0x6F675FFF, 0x7C1C2AFF, 0x5F0A15FF, 0x193826FF, 0x5D1B20FF, 0x9D9872FF, 0x7A7560FF, 0x989586FF, 0xADB0B0FF,
- 0x848988FF, 0x304F45FF, 0x4D6268FF, 0x162248FF, 0x272F4BFF, 0x7D6256FF, 0x9EA4ABFF, 0x9C8D71FF, 0x6D1822FF, 0x4E6881FF,
- 0x9C9C98FF, 0x917347FF, 0x661C26FF, 0x949D9FFF, 0xA4A7A5FF, 0x8E8C46FF, 0x341A1EFF, 0x6A7A8CFF, 0xAAAD8EFF, 0xAB988FFF,
- 0x851F2EFF, 0x6F8297FF, 0x585853FF, 0x9AA790FF, 0x601A23FF, 0x20202CFF, 0xA4A096FF, 0xAA9D84FF, 0x78222BFF, 0x0E316DFF,
- 0x722A3FFF, 0x7B715EFF, 0x741D28FF, 0x1E2E32FF, 0x4D322FFF, 0x7C1B44FF, 0x2E5B20FF, 0x395A83FF, 0x6D2837FF, 0xA7A28FFF,
- 0xAFB1B1FF, 0x364155FF, 0x6D6C6EFF, 0x0F6A89FF, 0x204B6BFF, 0x2B3E57FF, 0x9B9F9DFF, 0x6C8495FF, 0x4D8495FF, 0xAE9B7FFF,
- 0x406C8FFF, 0x1F253BFF, 0xAB9276FF, 0x134573FF, 0x96816CFF, 0x64686AFF, 0x105082FF, 0xA19983FF, 0x385694FF, 0x525661FF,
- 0x7F6956FF, 0x8C929AFF, 0x596E87FF, 0x473532FF, 0x44624FFF, 0x730A27FF, 0x223457FF, 0x640D1BFF, 0xA3ADC6FF, 0x695853FF,
- 0x9B8B80FF, 0x620B1CFF, 0x5B5D5EFF, 0x624428FF, 0x731827FF, 0x1B376DFF, 0xEC6AAEFF, 0x000000FF,
- // SA-MP extended colours (0.3x)
- 0x177517FF, 0x210606FF, 0x125478FF, 0x452A0DFF, 0x571E1EFF, 0x010701FF, 0x25225AFF, 0x2C89AAFF, 0x8A4DBDFF, 0x35963AFF,
- 0xB7B7B7FF, 0x464C8DFF, 0x84888CFF, 0x817867FF, 0x817A26FF, 0x6A506FFF, 0x583E6FFF, 0x8CB972FF, 0x824F78FF, 0x6D276AFF,
- 0x1E1D13FF, 0x1E1306FF, 0x1F2518FF, 0x2C4531FF, 0x1E4C99FF, 0x2E5F43FF, 0x1E9948FF, 0x1E9999FF, 0x999976FF, 0x7C8499FF,
- 0x992E1EFF, 0x2C1E08FF, 0x142407FF, 0x993E4DFF, 0x1E4C99FF, 0x198181FF, 0x1A292AFF, 0x16616FFF, 0x1B6687FF, 0x6C3F99FF,
- 0x481A0EFF, 0x7A7399FF, 0x746D99FF, 0x53387EFF, 0x222407FF, 0x3E190CFF, 0x46210EFF, 0x991E1EFF, 0x8D4C8DFF, 0x805B80FF,
- 0x7B3E7EFF, 0x3C1737FF, 0x733517FF, 0x781818FF, 0x83341AFF, 0x8E2F1CFF, 0x7E3E53FF, 0x7C6D7CFF, 0x020C02FF, 0x072407FF,
- 0x163012FF, 0x16301BFF, 0x642B4FFF, 0x368452FF, 0x999590FF, 0x818D96FF, 0x99991EFF, 0x7F994CFF, 0x839292FF, 0x788222FF,
- 0x2B3C99FF, 0x3A3A0BFF, 0x8A794EFF, 0x0E1F49FF, 0x15371CFF, 0x15273AFF, 0x375775FF, 0x060820FF, 0x071326FF, 0x20394BFF,
- 0x2C5089FF, 0x15426CFF, 0x103250FF, 0x241663FF, 0x692015FF, 0x8C8D94FF, 0x516013FF, 0x090F02FF, 0x8C573AFF, 0x52888EFF,
- 0x995C52FF, 0x99581EFF, 0x993A63FF, 0x998F4EFF, 0x99311EFF, 0x0D1842FF, 0x521E1EFF, 0x42420DFF, 0x4C991EFF, 0x082A1DFF,
- 0x96821DFF, 0x197F19FF, 0x3B141FFF, 0x745217FF, 0x893F8DFF, 0x7E1A6CFF, 0x0B370BFF, 0x27450DFF, 0x071F24FF, 0x784573FF,
- 0x8A653AFF, 0x732617FF, 0x319490FF, 0x56941DFF, 0x59163DFF, 0x1B8A2FFF, 0x38160BFF, 0x041804FF, 0x355D8EFF, 0x2E3F5BFF,
- 0x561A28FF, 0x4E0E27FF, 0x706C67FF, 0x3B3E42FF, 0x2E2D33FF, 0x7B7E7DFF, 0x4A4442FF, 0x28344EFF };
- #define DIALOG_ZONES (4)
- #define MAX_ZONES (200)
- enum zone{
- ZONE_CREATE[MAX_ZONES],
- ZONE_COUNT,
- bool:ZONE_ACTION,
- ZONE_COLOR[MAX_ZONES],
- bool:ZONE_ACTIVE,
- ZONE_FILE_NAME[144],
- bool:ZONE_MODE,
- };
- new iInfoZone[MAX_PLAYERS][zone],
- Float:ZONE_POSITION[MAX_PLAYERS][MAX_ZONES][4];
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
- if(newkeys & KEY_YES && iInfoZone[playerid][ZONE_ACTIVE]){
- PlayerPlaySound(playerid, 21000, 0,0,0);
- if(iInfoZone[playerid][ZONE_FILE_NAME] == '\0'){
- ShowPlayerDialog(playerid,DIALOG_ZONES+0, DIALOG_STYLE_INPUT, "{11B9AB}Sistema de creacion de zonas(areas):", "\
- {F9F9F9}INFO: escribe un nombre para el archivo de las zonas a crear: \n\
- {C21010}NOTA: no ir por debajo de 4, o por arriba de 144 caracteres,", "aceptar", "cancelar");
- }else{
- new
- Float:x,Float:y,Float:z;
- if(!IsPlayerInAnyVehicle(playerid)) GetPlayerPos(playerid, x,y,z);
- else GetVehiclePos(GetPlayerVehicleID(playerid), x,y,z);
- #pragma unused z
- if(!iInfoZone[playerid][ZONE_ACTION]){
- if(iInfoZone[playerid][ZONE_COUNT] > MAX_ZONES)
- return SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}limite de zonas creadas alcanzado{F9F9F9}!.");
- iInfoZone[playerid][ZONE_COUNT]++;
- ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][0] = x;
- ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][1] = y;
- iInfoZone[playerid][ZONE_ACTION] = true;
- SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}coordenadas {F9F9F9}minx | miny {11B9AB}obtenidas{F9F9F9}!.");
- }else{
- ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][2] = x;
- ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][3] = y;
- iInfoZone[playerid][ZONE_ACTION] = false;
- SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}coordenadas {F9F9F9}maxx | maxy {11B9AB}obtenidas{F9F9F9}!.");
- iInfoZone[playerid][ZONE_COLOR][iInfoZone[playerid][ZONE_COUNT]] = HexToInt(VehicleColoursTableRGBA[random(sizeof(VehicleColoursTableRGBA))]);
- iInfoZone[playerid][ZONE_CREATE][iInfoZone[playerid][ZONE_COUNT]] = GangZoneCreate(ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][0], ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][1], ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][2], ZONE_POSITION[playerid][iInfoZone[playerid][ZONE_COUNT]][3]);
- GangZoneShowForPlayer(playerid, iInfoZone[playerid][ZONE_CREATE][iInfoZone[playerid][ZONE_COUNT]], iInfoZone[playerid][ZONE_COLOR][iInfoZone[playerid][ZONE_COUNT]]);
- SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}zona creada, creacion exitosa{F9F9F9}!.");
- }
- }
- }
- if(newkeys & KEY_NO && iInfoZone[playerid][ZONE_ACTIVE]){
- if(iInfoZone[playerid][ZONE_COUNT] < 1)
- return SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}no hay ninguna area creada para guardar{F9F9F9}!.");
- if(iInfoZone[playerid][ZONE_ACTION])
- return SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}estas en proceso de creacion de un area{F9F9F9}!.");
- PlayerPlaySound(playerid, 21000, 0,0,0);
- ShowPlayerDialog(playerid,DIALOG_ZONES+1, DIALOG_STYLE_MSGBOX, "{11B9AB}Sistema de creacion de zonas(areas):", "\
- {F9F9F9}INFO: seleccione el modo de guardado:", "defecto", "streamer");
- }
- return true;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
- switch(dialogid){
- case DIALOG_ZONES+0:{
- if(response){
- new
- zText[144];
- if(sscanf(inputtext, "s[144]", zText)){
- PlayerPlaySound(playerid, 21000, 0,0,0);
- ShowPlayerDialog(playerid,DIALOG_ZONES+0, DIALOG_STYLE_INPUT, "{11B9AB}Sistema de creacion de zonas(areas):", "\
- {F9F9F9}INFO: escribe un nombre para el archivo de las zonas a crear: \n\
- {C21010}NOTA: no ir por debajo de 4, o por arriba de 144 caracteres,", "aceptar", "cancelar");
- return true;}
- if(strlen(zText) < 4 && strlen(zText) > 144){
- PlayerPlaySound(playerid, 21000, 0,0,0);
- ShowPlayerDialog(playerid,DIALOG_ZONES+0, DIALOG_STYLE_INPUT, "{11B9AB}Sistema de creacion de zonas(areas):", "\
- {F9F9F9}INFO: escribe un nombre para el archivo de las zonas a crear: \n\
- {C21010}NOTA: no ir por debajo de 4, o por arriba de 144 caracteres,", "aceptar", "cancelar");
- return true;}
- format(iInfoZone[playerid][ZONE_FILE_NAME],144,"%s", zText);
- SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}nombre asignado correctamente{F9F9F9}!.");
- PlayerPlaySound(playerid, 21000, 0,0,0);
- }else PlayerPlaySound(playerid, 21000, 0,0,0);
- }
- case DIALOG_ZONES+1:{
- PlayerPlaySound(playerid, 21000, 0,0,0);
- ShowPlayerDialog(playerid,DIALOG_ZONES+2, DIALOG_STYLE_MSGBOX, "{11B9AB}Sistema de creacion de zonas(areas):", "\
- {F9F9F9}INFO: seleccione el tipo de archivo:", ".TXT", ".PWN");
- if(response) iInfoZone[playerid][ZONE_MODE] = true, SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}modo de guardado seleccionado: {F9F9F9}por defecto.");
- else iInfoZone[playerid][ZONE_MODE] = false, SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}modo de guardado seleccionado: {F9F9F9}por streamer.");
- }
- case DIALOG_ZONES+2:{
- new
- zData[1024],File:zFiles;
- PlayerPlaySound(playerid, 21000, 0,0,0);
- format(zData,sizeof(zData),"%s.%s",iInfoZone[playerid][ZONE_FILE_NAME],(response)?("txt"):("pwn"));
- if(response) SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}tipo de archivo seleccionado: {F9F9F9}.TXT.");
- else SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}tipo de archivo seleccionado: {F9F9F9}.PWN.");
- if(fexist(zData)) fremove(zData);
- zFiles=fopen(zData, io_append);
- if(zFiles){
- fwrite(zFiles, "\r\n ## Sistema de creacion de zonas(areas) | By OTACON ## \r\n\r\n");
- if(response){
- format(zData,sizeof(zData)," new _zones[%d]; \r\n\r\n", iInfoZone[playerid][ZONE_COUNT]+1);
- fwrite(zFiles, zData);
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++){
- if(iInfoZone[playerid][ZONE_MODE]){
- format(zData,sizeof(zData)," _zones[%d] = GangZoneCreate(%f, %f ,%f, %f); \r\n", xx, ZONE_POSITION[playerid][xx][0], ZONE_POSITION[playerid][xx][1], ZONE_POSITION[playerid][xx][2], ZONE_POSITION[playerid][xx][3]);
- fwrite(zFiles, zData);
- format(zData,sizeof(zData)," GangZoneShowForPlayer(playerid, _zones[%d], 0x%08x); \r\n\r\n", xx, iInfoZone[playerid][ZONE_COLOR][xx]);
- fwrite(zFiles, zData);
- }else{
- format(zData,sizeof(zData)," _zones[%d] = CreateDynamicRectangle(%f, %f ,%f, %f, -1, -1, -1); \r\n\r\n", xx, ZONE_POSITION[playerid][xx][0], ZONE_POSITION[playerid][xx][1], ZONE_POSITION[playerid][xx][2], ZONE_POSITION[playerid][xx][3]);
- fwrite(zFiles, zData);
- }
- }
- }else{
- if(iInfoZone[playerid][ZONE_MODE]){
- fwrite(zFiles, "#include <a_samp>\r\n");
- format(zData,sizeof(zData),"new _zones[%d];\r\n\r\n", iInfoZone[playerid][ZONE_COUNT]+1);
- fwrite(zFiles, zData);
- fwrite(zFiles, "public OnFilterScriptInit(){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," _zones[%d] = GangZoneCreate(%f, %f ,%f, %f);\r\n", xx, ZONE_POSITION[playerid][xx][0], ZONE_POSITION[playerid][xx][1], ZONE_POSITION[playerid][xx][2], ZONE_POSITION[playerid][xx][3]),fwrite(zFiles, zData);
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- fwrite(zFiles, "public OnFilterScriptExit(){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," GangZoneDestroy(_zones[%d]);\r\n", xx),fwrite(zFiles, zData);
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- fwrite(zFiles, "public OnPlayerSpawn(playerid){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," GangZoneShowForPlayer(playerid, _zones[%d], 0x%08x);\r\n", xx, iInfoZone[playerid][ZONE_COLOR][xx]),fwrite(zFiles, zData);
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," // GangZoneFlashForPlayer(playerid, _zones[%d], 0x%08x);\r\n", xx, iInfoZone[playerid][ZONE_COLOR][xx]),fwrite(zFiles, zData);
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- fwrite(zFiles, "public OnPlayerDisconnect(playerid, reason){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," GangZoneHideForPlayer(playerid, _zones[%d]);\r\n", xx),fwrite(zFiles, zData);
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," // GangZoneStopFlashForPlayer(playerid, _zones[%d]);\r\n", xx),fwrite(zFiles, zData);
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- }else{
- fwrite(zFiles, "#include <a_samp>\r\n");
- fwrite(zFiles, "#include <streamer>\r\n");
- format(zData,sizeof(zData),"new _zones[%d];\r\n\r\n", iInfoZone[playerid][ZONE_COUNT]+1);
- fwrite(zFiles, zData);
- fwrite(zFiles, "public OnFilterScriptInit(){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," _zones[%d] = CreateDynamicRectangle(%f, %f ,%f, %f, -1, -1, -1);\r\n", xx, ZONE_POSITION[playerid][xx][0], ZONE_POSITION[playerid][xx][1], ZONE_POSITION[playerid][xx][2], ZONE_POSITION[playerid][xx][3]),fwrite(zFiles, zData);
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- fwrite(zFiles, "public OnFilterScriptExit(){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," DestroyDynamicArea(_zones[%d]);\r\n", xx),fwrite(zFiles, zData);
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- fwrite(zFiles, "public OnPlayerEnterDynamicArea(playerid, areaid){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," if(areaid == _zones[%d]){\r\n", xx),fwrite(zFiles, zData);
- fwrite(zFiles, " // coloca tu funcion aqui.\r\n");
- fwrite(zFiles, " }\r\n");
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- fwrite(zFiles, "public OnPlayerLeaveDynamicArea(playerid, areaid){\r\n");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++) format(zData,sizeof(zData)," if(areaid == _zones[%d]){\r\n", xx),fwrite(zFiles, zData);
- fwrite(zFiles, " // coloca tu funcion aqui.\r\n");
- fwrite(zFiles, " }\r\n");
- fwrite(zFiles, " return true;\r\n");
- fwrite(zFiles, "}\r\n\r\n");
- }
- }
- fwrite(zFiles, " ## Sistema de creacion de zonas(areas) | By OTACON ## \r\n");
- SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}zonas creadas, guardado exitoso{F9F9F9}!.");
- for(new xx=1, xxx=iInfoZone[playerid][ZONE_COUNT]; xx<=xxx; xx++){
- GangZoneHideForPlayer(playerid,iInfoZone[playerid][ZONE_CREATE][xx]);
- GangZoneDestroy(iInfoZone[playerid][ZONE_CREATE][xx]);
- ZONE_POSITION[playerid][xx][0] = 0.0, ZONE_POSITION[playerid][xx][1] = 0.0, ZONE_POSITION[playerid][xx][2] = 0.0, ZONE_POSITION[playerid][xx][3] = 0.0;
- iInfoZone[playerid][ZONE_COLOR][xx] = 0;
- }
- iInfoZone[playerid][ZONE_COUNT] = 0;
- iInfoZone[playerid][ZONE_ACTION] = false;
- iInfoZone[playerid][ZONE_MODE] = false;
- iInfoZone[playerid][ZONE_FILE_NAME][0] = '\0';
- SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}Sistema de creacion de zonas(areas), {F9F9F9}reiniciado!.");
- fclose(zFiles);
- }
- }
- }
- return false;
- }
- CMD:zone(playerid, params[]){
- if(!iInfoZone[playerid][ZONE_ACTIVE]) iInfoZone[playerid][ZONE_ACTIVE] = true, SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}Sistema de creacion de zonas(areas), {039914}encendido!.");
- else iInfoZone[playerid][ZONE_ACTIVE] = false, SendClientMessage(playerid,-1,"{F9F9F9}INFO: {11B9AB}Sistema de creacion de zonas(areas), {C21010}apagado!.");
- PlayerPlaySound(playerid, 21000, 0,0,0);
- new
- zData[1024];
- strcat(zData, "{C21010}## INSTRUCCIONES DE USO: \n");
- strcat(zData, "{F9F9F9}1)- utiliza el comando '/zone' para encender/apagar el editor de creacion de zonas(areas).\n");
- strcat(zData, "{F9F9F9}2)- utiliza la tecla 'Y' para obtener las cordenadas de la zona, minx/miny/maxx/maxy.\n");
- strcat(zData, "{9F9C9C}# la primera vez presionada la tecla 'Y' obtendas las coordenadas minx | miny.\n");
- strcat(zData, "{9F9C9C}# la segunda vez presionada la tecla 'Y' obtendas las coordenadas maxx | maxy,\n");
- strcat(zData, "{9F9C9C}y podras volver a crear otra zona, los colores son aleatorios(random).\n");
- strcat(zData, "{F9F9F9}3)- utiliza la tecla 'N' para guardar todas las zonas creadas al momento.\n");
- strcat(zData, "{9F9C9C}# (hay dos tipo de archivos, tipo uno: archivo .TXT, tipo dos: archivo .PWN).\n");
- strcat(zData, "{9F9C9C}# (hay dos modos de guardado, modo uno: gangzone por defecto, modo dos: gangzone por streamer.");
- ShowPlayerDialog(playerid,DIALOG_ZONES+3, DIALOG_STYLE_MSGBOX, "{11B9AB}Sistema de creacion de zonas(areas):", zData, "cerrar", "");
- return true;
- }
- public OnFilterScriptInit(){
- AddStaticVehicleEx(471, 2040.3107, 987.3111, 10.6721, -90.0000, random(200), random(200), 999999);
- AddPlayerClass(115,2042.9229,1017.5283,10.6719,110.6819,0,0,0,0,0,0); //
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement