Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Robos By BadyX
- /*
- 367 Cámara
- 1792 Televisor
- 1719 Consola blanca
- 2028 Consola negra
- 1210 Maletín
- 2149 Microondas
- 11743 Cafetera
- */
- #include <a_samp>
- #include <streamer>
- #include <zcmd>
- #include <a_actor>
- #include <easyDialog>
- #define funcion%0(%1) forward %0(%1); public %0(%1)
- new ObjetosRobo[8];
- new ObjetosFlechas[8];
- new Actores[1];
- new ObjetoEnManos[MAX_PLAYERS];
- new ObjetosEnVehiculo[MAX_VEHICLES][32];
- new ViendoMaleteroCoche[MAX_PLAYERS];
- new bool:EstaRobando[MAX_PLAYERS];
- new PickupRobo;
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" [FS] Robos en casas cargado.");
- print("--------------------------------------\n");
- PickupRobo = CreatePickup(1239, 19, 2736.3992,-2003.8533,13.5472, 0);
- for (new i = 1; i != MAX_VEHICLES; i ++)
- {
- for(new slot = 0; slot < 32; slot++)
- {
- ObjetosEnVehiculo[i][slot] = -1;
- }
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Sistema de robos By BadyX");
- print("----------------------------------\n");
- }
- /* Comandos */
- CMD:ir(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[!] Necesitas estar logeado con RCON para usar el comando.");
- SetPlayerPos(playerid, 2807.619873, -1171.899902,1025.570312);
- SetPlayerInterior(playerid, 8);
- return 1;
- }
- CMD:ir2(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[!] Necesitas estar logeado con RCON para usar el comando.");
- SetPlayerPos(playerid, 2736.3992,-2003.8533,13.5472);
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- CMD:robar(playerid, params[])
- {
- switch(EstaRobando[playerid])
- {
- case false:
- {
- if(GetPlayerDistanceFromPoint(playerid, 2807.619873, -1171.899902,1025.570312) > 20.0) return SendClientMessage(playerid, -1, "[!] No estás en una vivienda que se pueda robar.");
- ColocarObjetosParaRobo();
- ObjetoEnManos[playerid] = -1;
- EstaRobando[playerid] = true;
- SendClientMessage(playerid, -1, "[!] Busca objetos de valor por la casa.");
- }
- case true:
- {
- DestruirObjetosRobo();
- DestroyDynamicActor(Actores[0]);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- ObjetoEnManos[playerid] = -1;
- EstaRobando[playerid] = false;
- SendClientMessage(playerid, -1, "[!] Dejaste de robar casa.");
- }
- }
- return 1;
- }
- CMD:vender(playerid, params[])
- {
- if(GetPlayerDistanceFromPoint(playerid, 2736.3992,-2003.8533,13.5472) > 2.0) return SendClientMessage(playerid, -1, "[!] No estás cerca del almacen para vender objetos.");
- if(ObjetoEnManos[playerid] == -1) return SendClientMessage(playerid, -1, "[!] No tienes ningún objeto en tus manos para vender.");
- PagarPorObjeto(playerid, ObjetoEnManos[playerid]);
- return 1;
- }
- CMD:ver(playerid, params[])
- {
- new dialog[2024], string[128];
- new Conteo, Resultado;
- for(new i; i != MAX_VEHICLES; i++)
- {
- new dist = CheckPlayerDistanceToVehicle(4.5, playerid, i);
- if(dist)
- {
- Resultado = i;
- Conteo++;
- }
- }
- if(Conteo == 0) return SendClientMessage(playerid, -1, "Ningún vehículo cerca de usted.");
- if(Conteo > 1) return SendClientMessage(playerid, -1, "Encontrado más de un vehículo acercate bien.");
- ViendoMaleteroCoche[playerid] = Resultado;
- for(new i = 0; i < 32; i++)
- {
- new Bol = ObjetosEnVehiculo[Resultado][i];
- if(Bol == 0){format(string, sizeof(string), "\n{5cacee}#%d: {ffffff}Espacio libre", i+1);}
- else{format(string, sizeof(string), "\n{5cacee}#%d: {ffffff}%s {5cacee}", i+1, ObtenerNombreObjeto(ObjetosEnVehiculo[Resultado][i])); }
- strcat(dialog, string);
- }
- Dialog_Show(playerid, VerMaletero, DIALOG_STYLE_LIST, "Maletero", dialog, "Aceptar", "");
- return 1;
- }
- CMD:guardar(playerid, params[])
- {
- new Conteo, Resultado, TotalObjetos = 0;
- if(ObjetoEnManos[playerid] == -1) return SendClientMessage(playerid, -1, "No tienes ningún objeto para guardar.");
- for(new i; i != MAX_VEHICLES; i++)
- {
- new dist = CheckPlayerDistanceToVehicle(4.5, playerid, i);
- if(dist)
- {
- Resultado = i;
- Conteo++;
- }
- }
- if(Conteo == 0) return SendClientMessage(playerid, -1, "Ningún vehículo cerca de usted.");
- if(Conteo > 1) return SendClientMessage(playerid, -1, "Encontrado más de un vehículo acercate bien.");
- if(GetVehicleModel(Resultado) != 498) return SendClientMessage(playerid, -1, "Necesitas una furgoneta de ladrón para guardar los objetos.");
- new string[100];
- for(new slot = 0; slot < 32; slot++)
- {
- if(ObjetosEnVehiculo[Resultado][slot] == -1)
- {
- format(string, sizeof string, "Guardaste %s.\n", ObtenerNombreObjeto(ObjetoEnManos[playerid]));
- SendClientMessage(playerid, -1, string);
- ObjetosEnVehiculo[Resultado][slot] = ObjetoEnManos[playerid];
- RemovePlayerAttachedObject(playerid, 0);
- ObjetoEnManos[playerid] = -1;
- TotalObjetos ++;
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- break;
- }
- }
- if(TotalObjetos == 0)
- {
- SendClientMessage(playerid, -1, "Éste vehículo no puede guardar más objetos.");
- return 1;
- }
- return 1;
- }
- /* Funciones */
- Dialog:VerMaletero(playerid, response, listitem, inputtext[])
- {
- if(!response) return 1;
- if(ObjetosEnVehiculo[ViendoMaleteroCoche[playerid]][listitem] != -1)
- {
- if(ObjetoEnManos[playerid] == -1)
- {
- SendClientMessage(playerid, -1, "Objeto sacado.");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ObjetoEnManos[playerid] = ObjetosEnVehiculo[ViendoMaleteroCoche[playerid]][listitem];
- ObjetosEnVehiculo[ViendoMaleteroCoche[playerid]][listitem] = -1;
- switch(ObjetoEnManos[playerid])
- {
- case 0:
- {
- SetPlayerAttachedObject(playerid,0,367,6,0.198000,0.051999,0.107000,-108.099960,7.900002,83.099945,1.468000,1.000000,1.000000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- case 2:
- {
- SetPlayerAttachedObject(playerid,0,2028,6,0.045999,0.008000,-0.165999,74.899986,178.400009,82.499969,0.743999,0.642000,0.795000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- case 3:
- {
- SetPlayerAttachedObject(playerid,0,1210,6,0.000000,0.063999,-0.186999,-18.399997,84.799995,0.000000,1.000000,1.000000,1.000000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- case 4:
- {
- SetPlayerAttachedObject(playerid,0,1719,6,0.045999,0.008000,-0.165999,74.899986,178.400009,82.499969,0.743999,0.642000,0.795000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- case 5:
- {
- SetPlayerAttachedObject(playerid,0,1792,6,-0.137999,-0.022000,-0.160000,-105.900016,-1.299999,82.399955,0.646000,0.816000,0.720000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- case 6:
- {
- SetPlayerAttachedObject(playerid,0,11743,6,0.050999,0.157000,0.001999,162.499969,9.800006,0.699999,0.606000,0.686999,0.812000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- case 7:
- {
- SetPlayerAttachedObject(playerid,0,2149,6,0.089000,0.112999,-0.155999,-106.799972,-8.799959,71.500000,1.000000,1.000000,1.000000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(playerid, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "No hay ningún objeto para sacar en ese slot.");
- }
- return 1;
- }
- stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,PX,PY,PZ);
- GetVehiclePos(vehicleid, X,Y,Z);
- new Float:Distance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
- if(Distance <= radi*radi)
- {
- return 1;
- }
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys & KEY_YES)
- {
- if(EstaRobando[playerid] == true)
- {
- CercaDeObjeto(playerid);
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- EstaRobando[playerid] = false;
- ObjetoEnManos[playerid] = -1;
- return 1;
- }
- funcion ColocarObjetosParaRobo()
- {
- ObjetosRobo[0] = CreateDynamicObject(367, 2810.40137, -1167.04810, 1025.08875, 0.00000, 0.00000, 0.00000); //Camara
- ObjetosRobo[1] = CreateDynamicObject(1821, 2804.98022, -1171.09167, 1024.56250, 3.14160, 0.00000, -90.18170); //Mesa de decoración
- ObjetosRobo[2] = CreateDynamicObject(2028, 2805.32007, -1171.68420, 1025.10864, 0.00000, 0.00000, 0.00000); //Consola negra
- ObjetosRobo[3] = CreateDynamicObject(1210, 2819.63110, -1165.62585, 1028.97314, 90.00000, 0.00000, 270.00000); //Maletín
- ObjetosRobo[4] = CreateDynamicObject(1719, 2810.95142, -1165.37976, 1025.38354, 0.00000, 0.00000, 0.00000); //Consola blanca
- ObjetosRobo[5] = CreateDynamicObject(1792, 2815.05811, -1173.54016, 1025.31848, 0.00000, 0.00000, 180.00000); //Televisor
- ObjetosRobo[6] = CreateDynamicObject(11743, 2820.42578, -1167.46448, 1025.62134, 0.00000, 0.00000, 270.00000); //Cafetera
- ObjetosRobo[7] = CreateDynamicObject(2149, 2818.48608, -1165.15588, 1025.75403, 0.00000, 0.00000, 0.00000); //Microondas
- ObjetosFlechas[0] = CreateDynamicObject(1559, 2805.41870, -1171.58545, 1026.22314, 0.00000, 0.00000, 0.00000); //Consola negra
- ObjetosFlechas[1] = CreateDynamicObject(1559, 2810.90503, -1165.32532, 1026.56311, 0.00000, 0.00000, 0.00000); //Consola blanca
- ObjetosFlechas[2] = CreateDynamicObject(1559, 2810.46338, -1166.89905, 1026.22314, 0.00000, 0.00000, 0.00000); //Cámara
- ObjetosFlechas[3] = CreateDynamicObject(1559, 2818.52222, -1165.14221, 1026.98315, 0.00000, 0.00000, 0.00000); //Microondas
- ObjetosFlechas[4] = CreateDynamicObject(1559, 2820.48901, -1167.44141, 1027.18323, 0.00000, 0.00000, 0.00000); //Cafetera
- ObjetosFlechas[5] = CreateDynamicObject(1559, 2815.02734, -1173.16248, 1027.26318, 0.00000, 0.00000, 0.00000); //Televisor
- ObjetosFlechas[6] = CreateDynamicObject(1559, 2819.55225, -1165.58606, 1030.02417, 0.00000, 0.00000, 0.00000); //Maletín
- Actores[0] = CreateDynamicActor(252, 2817.0649,-1169.1329,1029.9033,249.6644);
- ApplyDynamicActorAnimation(Actores[0], "CRACK","crckidle2",4.1,0,1,1,1,1);
- ApplyDynamicActorAnimation(Actores[0], "CRACK","crckidle2",4.1,0,1,1,1,1);
- return 1;
- }
- funcion DestruirObjetosRobo()
- {
- for(new slot = 0; slot < 7; slot++)
- {
- DestroyDynamicObject(ObjetosRobo[slot]);
- DestroyDynamicObject(ObjetosFlechas[slot]);
- }
- return 1;
- }
- funcion CercaDeObjeto(Jugador)
- {
- new Conteo = 0;
- if(IsPlayerInRangeOfPoint(Jugador, 1.0, 2810.40137, -1167.04810, 1025.08875))
- {
- if(ObjetoEnManos[Jugador] != -1) return SendClientMessage(Jugador, -1, "Ya portas un objeto en tus manos, déjalo primero.");
- SendClientMessage(Jugador, -1, # Cámara cerca);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_CARRY);
- SetPlayerAttachedObject(Jugador,0,367,6,0.198000,0.051999,0.107000,-108.099960,7.900002,83.099945,1.468000,1.000000,1.000000);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- DestroyDynamicObject(ObjetosRobo[0]);
- DestroyDynamicObject(ObjetosFlechas[2]);
- ObjetoEnManos[Jugador] = 0;
- Conteo ++;
- }
- else if(IsPlayerInRangeOfPoint(Jugador, 2.0, 2815.05811, -1173.54016, 1025.31848))
- {
- if(ObjetoEnManos[Jugador] != -1) return SendClientMessage(Jugador, -1, "Ya portas un objeto en tus manos, déjalo primero.");
- SendClientMessage(Jugador, -1, # Televisor cerca);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_CARRY);
- SetPlayerAttachedObject(Jugador,0,1792,6,-0.137999,-0.022000,-0.160000,-105.900016,-1.299999,82.399955,0.646000,0.816000,0.720000);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- DestroyDynamicObject(ObjetosRobo[5]);
- DestroyDynamicObject(ObjetosFlechas[5]);
- Conteo ++;
- ObjetoEnManos[Jugador] = 5;
- }
- else if(IsPlayerInRangeOfPoint(Jugador, 1.0, 2805.32007, -1171.68420, 1025.10864))
- {
- if(ObjetoEnManos[Jugador] != -1) return SendClientMessage(Jugador, -1, "Ya portas un objeto en tus manos, déjalo primero.");
- SendClientMessage(Jugador, -1, # Videoconsola negra);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_CARRY);
- SetPlayerAttachedObject(Jugador,0,2028,6,0.045999,0.008000,-0.165999,74.899986,178.400009,82.499969,0.743999,0.642000,0.795000);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- DestroyDynamicObject(ObjetosRobo[2]);
- DestroyDynamicObject(ObjetosFlechas[0]);
- ObjetoEnManos[Jugador] = 2;
- Conteo ++;
- }
- else if(IsPlayerInRangeOfPoint(Jugador, 1.0, 2819.63110, -1165.62585, 1028.97314))
- {
- if(ObjetoEnManos[Jugador] != -1) return SendClientMessage(Jugador, -1, "Ya portas un objeto en tus manos, déjalo primero.");
- SendClientMessage(Jugador, -1, # Maletín cerca);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_CARRY);
- SetPlayerAttachedObject(Jugador,0,1210,6,0.000000,0.063999,-0.186999,-18.399997,84.799995,0.000000,1.000000,1.000000,1.000000);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- DestroyDynamicObject(ObjetosRobo[3]);
- DestroyDynamicObject(ObjetosFlechas[6]);
- ObjetoEnManos[Jugador] = 3;
- Conteo ++;
- }
- else if(IsPlayerInRangeOfPoint(Jugador, 1.0, 2810.95142, -1165.37976, 1025.38354))
- {
- if(ObjetoEnManos[Jugador] != -1) return SendClientMessage(Jugador, -1, "Ya portas un objeto en tus manos, déjalo primero.");
- SendClientMessage(Jugador, -1, # Videoconsola blanca);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_CARRY);
- SetPlayerAttachedObject(Jugador,0,1719,6,0.045999,0.008000,-0.165999,74.899986,178.400009,82.499969,0.743999,0.642000,0.795000);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- DestroyDynamicObject(ObjetosRobo[4]);
- DestroyDynamicObject(ObjetosFlechas[1]);
- ObjetoEnManos[Jugador] = 4;
- Conteo ++;
- }
- else if(IsPlayerInRangeOfPoint(Jugador, 1.0, 2820.42578, -1167.46448, 1025.62134))
- {
- if(ObjetoEnManos[Jugador] != -1) return SendClientMessage(Jugador, -1, "Ya portas un objeto en tus manos, déjalo primero.");
- SendClientMessage(Jugador, -1, # Cafetera cerca);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_CARRY);
- SetPlayerAttachedObject(Jugador,0,11743,6,0.050999,0.157000,0.001999,162.499969,9.800006,0.699999,0.606000,0.686999,0.812000);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- DestroyDynamicObject(ObjetosRobo[6]);
- DestroyDynamicObject(ObjetosFlechas[4]);
- ObjetoEnManos[Jugador] = 6;
- Conteo ++;
- }
- else if(IsPlayerInRangeOfPoint(Jugador, 1.0, 2818.48608, -1165.15588, 1025.75403))
- {
- if(ObjetoEnManos[Jugador] != -1) return SendClientMessage(Jugador, -1, "Ya portas un objeto en tus manos, déjalo primero.");
- SendClientMessage(Jugador, -1, # Microondas cerca);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_CARRY);
- SetPlayerAttachedObject(Jugador,0,2149,6,0.089000,0.112999,-0.155999,-106.799972,-8.799959,71.500000,1.000000,1.000000,1.000000);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- ApplyAnimation(Jugador, "CARRY","crry_prtial",4.1,0,1,1,1,1);
- DestroyDynamicObject(ObjetosRobo[7]);
- DestroyDynamicObject(ObjetosFlechas[3]);
- ObjetoEnManos[Jugador] = 7;
- Conteo ++;
- }
- if(Conteo == 0) return SendClientMessage(Jugador, -1, # No hay objetos cercanos);
- return 1;
- }
- stock ObtenerNombreObjeto(id)
- {
- new nombre[64] = "n objeto desconocido";
- if(id == -1) nombre = "Slot libre";
- if(id == 0) nombre = "Una cámara fotográfica";
- if(id == 2) nombre = "Una videoconsola negra";
- if(id == 3) nombre = "Un maletín";
- if(id == 4) nombre = "Una videoconsola blanca";
- if(id == 5) nombre = "Un televisor";
- if(id == 6) nombre = "Una cafetera";
- if(id == 7) nombre = "Un microondas";
- return nombre;
- }
- funcion PagarPorObjeto(Jugador, Objeto)
- {
- new string[80];
- switch(Objeto)
- {
- case 0:
- {
- new PrecioCamara = random(100) + 200;
- GivePlayerMoney(Jugador, PrecioCamara);
- format(string, sizeof(string), "Recibiste %d$ por vender \n", PrecioCamara, ObtenerNombreObjeto(ObjetoEnManos[Jugador]));
- SendClientMessage(Jugador, -1, string);
- ObjetoEnManos[Jugador] = -1;
- RemovePlayerAttachedObject(Jugador, 0);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_NONE);
- }
- case 2:
- {
- new PrecioConsolaNegra = random(300) + 200;
- GivePlayerMoney(Jugador, PrecioConsolaNegra);
- format(string, sizeof(string), "Recibiste %d$ por vender \n", PrecioConsolaNegra, ObtenerNombreObjeto(ObjetoEnManos[Jugador]));
- SendClientMessage(Jugador, -1, string);
- ObjetoEnManos[Jugador] = -1;
- RemovePlayerAttachedObject(Jugador, 0);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_NONE);
- }
- case 3:
- {
- GivePlayerMoney(Jugador, 5000);
- SendClientMessage(Jugador, -1, "Recibiste 5000$ por el maletín.");
- ObjetoEnManos[Jugador] = -1;
- RemovePlayerAttachedObject(Jugador, 0);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_NONE);
- }
- case 4:
- {
- new PrecioConsolaBlanca = random(300) + 200;
- GivePlayerMoney(Jugador, PrecioConsolaBlanca);
- format(string, sizeof(string), "Recibiste %d$ por vender \n", PrecioConsolaBlanca, ObtenerNombreObjeto(ObjetoEnManos[Jugador]));
- SendClientMessage(Jugador, -1, string);
- ObjetoEnManos[Jugador] = -1;
- RemovePlayerAttachedObject(Jugador, 0);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_NONE);
- }
- case 5:
- {
- new PrecioTelevisor = random(400) + 200;
- GivePlayerMoney(Jugador, PrecioTelevisor);
- format(string, sizeof(string), "Recibiste %d$ por vender \n", PrecioTelevisor, ObtenerNombreObjeto(ObjetoEnManos[Jugador]));
- SendClientMessage(Jugador, -1, string);
- ObjetoEnManos[Jugador] = -1;
- RemovePlayerAttachedObject(Jugador, 0);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_NONE);
- }
- case 6:
- {
- new PrecioCafetera = random(100) + 150;
- GivePlayerMoney(Jugador, PrecioCafetera);
- format(string, sizeof(string), "Recibiste %d$ por vender \n", PrecioCafetera, ObtenerNombreObjeto(ObjetoEnManos[Jugador]));
- SendClientMessage(Jugador, -1, string);
- ObjetoEnManos[Jugador] = -1;
- RemovePlayerAttachedObject(Jugador, 0);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_NONE);
- }
- case 7:
- {
- new PrecioMicroondas = random(100) + 150;
- GivePlayerMoney(Jugador, PrecioMicroondas);
- format(string, sizeof(string), "Recibiste %d$ por vender \n", PrecioMicroondas, ObtenerNombreObjeto(ObjetoEnManos[Jugador]));
- SendClientMessage(Jugador, -1, string);
- ObjetoEnManos[Jugador] = -1;
- RemovePlayerAttachedObject(Jugador, 0);
- SetPlayerSpecialAction(Jugador, SPECIAL_ACTION_NONE);
- }
- }
- return 1;
- }
- #pragma unused PickupRobo
Advertisement
Add Comment
Please, Sign In to add comment