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.
- */
- /*
- http://i.imgur.com/zMO8SVe.png
- http://i.imgur.com/zMO8SVe.png
- http://i.imgur.com/zMO8SVe.png
- http://i.imgur.com/zMO8SVe.png
- http://i.imgur.com/zMO8SVe.png
- */
- #include <a_samp>
- #include <zcmd>
- #define DIALOG_MOCHILA (1)
- #define MAX_SLOTS (10)
- enum a_armas{
- armas_guardadas[MAX_SLOTS],
- municion_guardadas[MAX_SLOTS],
- bool:slots_usado[MAX_SLOTS],
- bool:con_mochila,
- };
- new InfoMochila[MAX_PLAYERS][a_armas];
- stock menu_Mochila(playerid){
- new data[1024], //esto lo debes cambiar, obvio -.-
- datos[1024],//esto lo debes cambiar, obvio -.-
- gunname[32];
- strcat(datos, "Slots\tArma\tMunicion\n");
- for(new index=0; index<MAX_SLOTS; index++){
- new armaid = InfoMochila[playerid][armas_guardadas][index];
- if(InfoMochila[playerid][slots_usado][index]) GetWeaponName(armaid,gunname,sizeof(gunname));
- else gunname = "vacio";
- format(data,sizeof(data),"slot:(%d)\t%s\t%d balas\n", index, gunname, InfoMochila[playerid][municion_guardadas][index]);
- strcat(datos, data);
- }
- ShowPlayerDialog(playerid, DIALOG_MOCHILA+0, DIALOG_STYLE_TABLIST_HEADERS, "Mochila:",datos,"seleccionar", "cancelar");
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
- switch(dialogid){
- case DIALOG_MOCHILA+0:{
- if(response){
- if(!InfoMochila[playerid][slots_usado][listitem]){ //guardar
- if(GetPlayerWeapon(playerid)<=0){ menu_Mochila(playerid);return true; }
- InfoMochila[playerid][armas_guardadas][listitem] = GetPlayerWeapon(playerid);
- InfoMochila[playerid][municion_guardadas][listitem] = GetPlayerAmmo(playerid);
- ResetPlayerWeaponsEx(playerid, GetPlayerWeapon(playerid));
- SetPlayerArmedWeapon(playerid,0);
- InfoMochila[playerid][slots_usado][listitem] = true;
- menu_Mochila(playerid);
- }else{ // equipar
- GivePlayerWeapon(playerid, InfoMochila[playerid][armas_guardadas][listitem] ,InfoMochila[playerid][municion_guardadas][listitem]);
- SetPlayerAmmo(playerid, InfoMochila[playerid][armas_guardadas][listitem] ,InfoMochila[playerid][municion_guardadas][listitem]);
- InfoMochila[playerid][armas_guardadas][listitem] = 0;
- InfoMochila[playerid][municion_guardadas][listitem] = 0;
- InfoMochila[playerid][slots_usado][listitem] = false;
- menu_Mochila(playerid);
- }
- }
- }
- }
- return false;
- }
- COMMAND:mochila(playerid, params[]){
- menu_Mochila(playerid);
- return true;
- }
- stock ResetPlayerWeaponsEx(playerid, weaponid){
- new weapons[13][2];
- for (new slots=0; slots<13; slots++){
- if(slots==GetWeaponSlot(weaponid))continue;
- GetPlayerWeaponData(playerid, slots, weapons[slots][0], weapons[slots][1]);
- }ResetPlayerWeapons(playerid);
- for (new slots=0; slots<13; slots++){
- GivePlayerWeapon(playerid, weapons[slots][0], weapons[slots][1]);
- SetPlayerAmmo(playerid, weapons[slots][0], weapons[slots][1]);
- }}
- stock GetWeaponSlot(weaponid){
- new slots;
- switch(weaponid){
- case 0,1: slots = 0;
- case 2..9: slots = 1;
- case 10..15: slots = 10;
- case 16..18,39: slots = 8;
- case 22..24: slots = 2;
- case 25..27: slots = 3;
- case 28,29,32: slots = 4;
- case 30,31: slots = 5;
- case 33,34: slots = 6;
- case 35..38: slots = 7;
- case 40: slots = 12;
- case 41..43: slots = 9;
- case 44..46: slots = 11;
- }return slots;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement