Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Funciones ZumeZero v1.0 */
- /* Version 1.0 - 10 Funciones */
- /* Creado el 24/08/2012 por Zume-Zero */
- /* MensajePro(playerid,color,"Texto"); - Mensaje */
- /* ShowInfoClientDestroy(playerid); - Destruir Info antes */
- /* ShowInfoClient("Texto", 5000, playerid); - Mostrar un Info */
- /* DarArma(playerid, id, municion); - Dar Arma al playerid */
- /* PlayRolUser(playerid, "Rol") - Rol Automatico añadiendo el name */
- /* MostrarAmmunation(playerid); - Mostrar una Tienda de armas */
- /* QuitarDinero(playerid, monto); - Quita el dinero y un GText Rojo con lo que perdimos */
- /* DarDinero(playerid, monto); - Da el dinero y un GText Verde con lo que Ganamos */
- /* DarDinero(playerid, monto); - Da el dinero y un GText Verde con lo que Ganamos */
- /* ChequearDinero(playerid, dinero) - Si tiene menos de la cantidad de 'dinero' Envia una Restriccion */
- #include <a_samp>
- // Importantes
- #define LLAMADA:%0(%1) forward %0(%1); public %0(%1) // LLAMADA:
- #define DarArma GivePlayerWeapon // DarArma(playerid, idarma, municion);
- #define Ammunation_Orden 2182
- #define AMMUNATION_MENU_DEF 3791
- #define Ammu_Pistolas_1683 2368
- #define Ammu_AM_3782 732
- #define Ammu_Petas_192 572
- #define Ammu_ARraz_873 4562
- #define Ammu_Fesiona_282 4756
- #define COLOR_DEL_ROL 0xC2A2DAAA
- #define Raya_Util "____"
- #define de_25512 "d"
- #define CajaColor_2792 0x00000066
- #define Tiempo_Nombre_a47 "[%d-%d-%d] %s"
- #define Message_Restriccion "¡Dinero Insuficiente! Te Falta: %d$"
- #define Nombre_Y_Message "%s %s"
- #define Distancia_Rol_23xD (30.0)
- #define Interior_Defaul (0)
- // Armas - Nombres
- #define WEP_BRASS 1 // Brass Knuckles - Nudillos
- #define WEP_GOLF 2 // Golf Club - Palo de Golf
- #define WEP_STICK 3 // Nite Stick- Machete de policia
- #define WEP_KNIFE 4 // Knife- Cuchillo
- #define WEP_BASE 5 // Baseball Bat- Bate de Baseball
- #define WEP_SHOV 6 // Shovel- Pala
- #define WEP_POOL 7 // Pool Cue- Palo de Pool
- #define WEP_KATA 8 // Katana -Katana
- #define WEP_CHAIN 9 // ChainSaw- MotoSierra
- #define WEP_PUDIL 10 // Purple Dildo - Consolador Violeta
- #define WEP_SWVIB 11 // Small White Vibrator - Consolador blanco pequeño
- #define WEP_LWVIB 12 // Large White Vibrator - Consolador blanco largo
- #define WEP_SVIBR 13 // Silver Vibrator - Consolador plateado
- #define WEP_FLOW 14 // Flowers - Flores
- #define WEP_CANE 15 // Cane - Baston
- #define WEP_GRENA 16 // Grenade - Granadas
- #define WEP_TEAR 17 // Tear Grenade - Granada de humo
- #define WEP_MOLOT 18 // Molotov Cocktail - Molotov
- #define WEP_9MM 22// 9mm - 9mm
- #define WEP_SI9MM 23// Silenced 9mm - 9mm Silenciosa
- #define WEP_EAGLE 24 // Desert Eagle - Desert Eagle
- #define WEP_SHOTG 25 // Shotgun - Escopeta
- #define WEP_SAWNO 26// Sawn-off Shotgun - Escopeta recortada
- #define WEP_CSHOT 27// Combat Shotgun - Escopeta de Combate
- #define WEP_MISMG 28 // Micro SMG - Micro SMG
- #define WEP_MP5 29 // MP5 - MP5
- #define WEP_AK47 30// AK47 - AK47
- #define WEP_M4 31 // M4 - M4
- #define WEP_TEC9 32 // Tec9 - Tec9
- #define WEP_CRIFL 33 // Country Rifle - Rifle con mira
- #define WEP_SNIRI 34 // Sniper Rifle - Rifle de presicion
- #define WEP_ROCKT 35 // Rocket Launcher - Lanzacohetes sin mira
- #define WEP_HSROC 36 // HS Rocket Launcher - Lanzacohetes con mira
- #define WEP_FLAME 37 // Flamethrower - Lanzallamas
- #define WEP_MINIG 38 // Minigun - Minigun
- #define WEP_SATCH 39 // Satchel Charge - Dispositivo explosivo
- #define WEP_DETON 40 // Detonator - Detonador
- #define WEP_SPRY 41 // Spraycan - Aerosol
- #define WEP_FIRER 42 // Fire Extinguisher
- #define WEP_CAMAR 43 // Camarera - Camara de fotos
- #define WEP_NIGHT 44 // Nightvision Goggles - Lentes de vision nocturna
- #define WEP_TERM 45 // Thermal Goggles - Lentes de vision termica
- #define WEP_PARAC 46 // Parachute - Paracaidas
- new BigEar[MAX_PLAYERS];
- new Text:Box_Texto[MAX_PLAYERS];
- #pragma tabsize 0
- LLAMADA: ShowInfoClient(texto[], interval, playerid)
- {
- ShowInfoClientDraw();
- TextDrawSetString(Box_Texto[playerid], texto);
- TextDrawShowForPlayer(playerid, Box_Texto[playerid]);
- SetTimerEx("ShowInfoClientDestroy", interval, false, de_25512, playerid);
- }
- LLAMADA: ShowInfoClientDraw()
- {
- for(new playerid; playerid < MAX_PLAYERS; playerid++)
- {
- Box_Texto[playerid] = TextDrawCreate(25.000000, 190.000000,Raya_Util);
- TextDrawBackgroundColor(Box_Texto[playerid], 255);
- TextDrawFont(Box_Texto[playerid], 1);
- TextDrawLetterSize(Box_Texto[playerid], 0.300000, 1.299999);
- TextDrawColor(Box_Texto[playerid], -1);
- TextDrawSetOutline(Box_Texto[playerid], 1);
- TextDrawSetProportional(Box_Texto[playerid], 1);
- TextDrawUseBox(Box_Texto[playerid], 1);
- TextDrawBoxColor(Box_Texto[playerid],0x00000066);
- TextDrawTextSize(Box_Texto[playerid], 219.000000, 0.000000);
- }
- }
- LLAMADA: ShowInfoClientDestroy(playerid)
- {
- TextDrawHideForPlayer(playerid, Box_Texto[playerid]);
- }
- LLAMADA: PlayRolUser(playerid,mensaje[])
- {
- new string[128];
- format(string, sizeof(string), Nombre_Y_Message, UserRolerNombre(playerid), mensaje);
- MessageDistancia(Distancia_Rol_23xD, playerid, string, COLOR_DEL_ROL,COLOR_DEL_ROL,COLOR_DEL_ROL,COLOR_DEL_ROL,COLOR_DEL_ROL);
- return 1;
- }
- LLAMADA: MessageDistancia(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
- {
- if(!BigEar[i])
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }
- }
- return 1;
- }
- LLAMADA: MensajePro(playerid,color,texto[])
- {
- new string[250];
- new Hora1,Minuto1,Segundo1;
- gettime(Hora1,Minuto1,Segundo1);
- format(string, sizeof(string), Tiempo_Nombre_a47, Hora1, Minuto1, Segundo1, texto);
- SendClientMessage(playerid, color, string);
- return 1;
- }
- stock UserRolerNombre(playerid)
- {
- new Nombre[24];
- GetPlayerName(playerid,Nombre,24);
- new N[24];
- strmid(N,Nombre,0,strlen(Nombre),24);
- for(new i = 0; i < MAX_PLAYER_NAME; i++)
- {
- if (N[i] == '_') N[i] = ' ';
- }
- return N;
- }
- LLAMADA: MostrarAmmunation(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- ShowPlayerDialog(playerid,Ammunation_Orden,DIALOG_STYLE_LIST,"Ammunation_Tienda","Pistolas\nMetralletas\nEscopetas\nArrojadizas\nProtección","Mirar","Salir");
- }
- return 1;
- }
- LLAMADA: OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == Ammunation_Orden)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid,Ammu_Pistolas_1683,DIALOG_STYLE_LIST,"Pistolas","9mm :20: - (220$)\nDesert Eagle :10: - (300$)","Aceptar","Atras");
- }
- case 1:
- {
- ShowPlayerDialog(playerid,Ammu_AM_3782,DIALOG_STYLE_LIST,"Fusiles","MP5 :100: - (799$)\nM4 :150: - (1099$)\nAK-47 :250: - (1400$)","Aceptar","Atras");
- }
- case 2:
- {
- ShowPlayerDialog(playerid,Ammu_Petas_192,DIALOG_STYLE_LIST,"Escopetas","Escopeta Caza :20: - (399$)\nShotgun :15: - (499$)","Aceptar","Atras");
- }
- case 3:
- {
- ShowPlayerDialog(playerid,Ammu_Fesiona_282,DIALOG_STYLE_LIST,"Protección","Chaleco - (400$)\nCaja PainKillerS :6: - (99$)","Aceptar","Atras");
- }
- }
- }
- }
- if(dialogid == AMMUNATION_MENU_DEF)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- QuitarDinero(playerid, 5);
- DarArma(playerid, 41, 500);
- }
- case 1:
- {
- QuitarDinero(playerid, 25);
- DarArma(playerid, 1,1);
- }
- case 2:
- {
- QuitarDinero(playerid, 45);
- DarArma(playerid, 4,1);
- }
- case 3:
- {
- QuitarDinero(playerid, 15);
- DarArma(playerid, 15,1);
- }
- case 4:
- {
- QuitarDinero(playerid, 75);
- DarArma(playerid, 5,1);
- }
- }
- } else MostrarAmmunation(playerid);
- }
- if(dialogid == Ammu_Pistolas_1683)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- QuitarDinero(playerid, 220);
- DarArma(playerid,22,20);
- }
- case 1:
- {
- QuitarDinero(playerid, 300);
- DarArma(playerid, 24,10);
- }
- }
- } else MostrarAmmunation(playerid);
- }
- if(dialogid == Ammu_AM_3782)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- QuitarDinero(playerid, 799);
- DarArma(playerid, 29,100);
- }
- case 1:
- {
- QuitarDinero(playerid, 1099);
- DarArma(playerid, 31,150);
- }
- case 2:
- {
- QuitarDinero(playerid, 1400);
- DarArma(playerid, 30,250);
- }
- }
- } else MostrarAmmunation(playerid);
- }
- if(dialogid == Ammu_Petas_192)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- QuitarDinero(playerid, 399);
- DarArma(playerid, 33,20);
- }
- case 1:
- {
- QuitarDinero(playerid, 499);
- DarArma(playerid, 25,15);
- }
- }
- } else MostrarAmmunation(playerid);
- }
- if(dialogid == Ammu_ARraz_873)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- QuitarDinero(playerid, 20);
- DarArma(playerid, 18,1);
- }
- }
- } else MostrarAmmunation(playerid);
- }
- if(dialogid == Ammu_Fesiona_282)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- QuitarDinero(playerid, 400);
- SetPlayerArmour(playerid, 100);
- }
- }
- } else MostrarAmmunation(playerid);
- }
- return 1;
- }
- LLAMADA: QuitarDinero(playerid, monto)
- {
- if(IsPlayerConnected(playerid))
- {
- new a[12];
- format(a,sizeof(a),"~r~ -%d$",monto);
- GameTextForPlayer(playerid, a, 5000, 1);
- GivePlayerMoney(playerid, -monto);
- PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
- }
- return 1;
- }
- LLAMADA: DarDinero(playerid, monto)
- {
- if(IsPlayerConnected(playerid))
- {
- new a[12];
- format(a,sizeof(a),"~g~ %d$",monto);
- GameTextForPlayer(playerid, a, 5000, 1);
- GivePlayerMoney(playerid, monto);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- }
- return 1;
- }
- LLAMADA: ChequearDinero(playerid, dinero)
- {
- if(IsPlayerConnected(playerid))
- {
- new b[64];
- new xx;
- xx = dinero - (GetPlayerMoney(playerid));
- if(GetPlayerMoney(playerid) >= dinero)
- {
- return 1;
- }
- else
- {
- format(b,sizeof(b),Message_Restriccion,xx);
- SendClientMessage(playerid, 0xDC092FFF, b);
- return 0;
- }
- }
- return 0;
- }
- ////////////////////////////////// By Zume-Zero ////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement