Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* FS CREADO POR STRIKE
- BRUNO DA SILVA SCRIPT DETECTAR DISPARO*/
- #include a_samp
- #include zcmd
- #include Dini
- #define TAMANHO_OBJETO 1.4
- #define Rojo 0xa80707FF
- new Float:X_OBJETO[10][1] =
- {
- {-1687.25427},
- {-1639.22363},
- {-1513.02942},
- {-1769.84949},
- {-1720.98523},
- {-1411.85046},
- {-1241.92603},
- {-1353.24121},
- {-1487.88245},
- {-1610.81677}
- };
- new Float:Y_OBJETO[10][1] =
- {
- {-2168.04907},
- {-2314.11646},
- {-2167.67188},
- {-2338.39404},
- {-2021.65540},
- {-2038.05493},
- {-2334.24463},
- {-2418.34351},
- {-2570.38428},
- {-2694.43848}
- };
- new Float:BambisObj[10][3] =
- {
- {-1687.25427, -2168.04907, 38.27590},
- {-1639.22363, -2314.11646, 59.25200},
- {-1513.02942, -2167.67188, 0.51030},
- {-1769.84949, -2338.39404, 44.43521},
- {-1720.98523, -2021.65540, 71.04913},
- {-1411.85046, -2038.05493, 0.60150},
- {-1241.92603, -2334.24463, 18.44890},
- {-1353.24121, -2418.34351, 31.89130},
- {-1487.88245, -2570.38428, 71.90640},
- {-1610.81677, -2694.43848, 48.01360}
- };
- new Bambi[MAX_PLAYERS];
- enum PlayerData
- {
- pCazador,
- }
- new PlayerInfo[MAX_PLAYERS][PlayerData];
- public OnFilterScriptInit()
- {
- CreatePickup(1239, 1, -1634.8252,-2244.1931,31.4766);
- Create3DTextLabel("{F3FC01}Empleo: {F70636}Cazador\n{E3F706}Use {F70636}/cazar\n{E3F706}Para comenzar a trabajar", 0x008080FF, -1634.8252,-2244.1931,31.4766, 10.0, 0, 0);
- //map casa
- CreateObject(1736, -1628.80774, -2239.59741, 33.07220, 0.00000, 0.00000, -90.00000);
- CreateObject(1828, -1634.97388, -2239.17261, 30.45190, 0.00000, 0.00000, 0.00000);
- CreateObject(1703, -1636.20154, -2232.75757, 30.43860, 0.00000, 0.00000, 2.96170);
- CreateObject(1825, -1630.96948, -2236.40820, 30.45860, 0.00000, 0.00000, 0.00000);
- CreateObject(2166, -1637.07458, -2247.62500, 30.47040, 0.00000, 0.00000, 0.00000);
- CreateObject(2172, -1632.39795, -2247.39893, 30.45040, 0.00000, 0.00000, 181.22121);
- CreateObject(1703, -1637.53430, -2236.92017, 30.43860, 0.00000, 0.00000, 90.00000);
- CreateObject(2209, -1635.45422, -2236.11133, 30.31440, 0.00000, 0.00000, 90.00000);
- return 1;
- }
- main()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new file[80];
- format(file, sizeof(file),"Cazador/%s.ini", pName(playerid));
- if(dini_Exists(file))
- {
- PlayerInfo[playerid][pCazador] = dini_Int(file,"Cazador");
- }
- else if(!dini_Exists(file))
- {
- dini_Create(file);
- dini_IntSet(file,"Cazador",PlayerInfo[playerid][pCazador] = 0);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new file[256];
- format(file, sizeof(file),"Cazador/%s.ini", pName(playerid));
- dini_IntSet(file,"Cazador",PlayerInfo[playerid][pCazador]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- GivePlayerWeapon(playerid, 32, 400);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new rand = random(sizeof(X_OBJETO));
- new rand3 = random(sizeof(BambisObj));
- new rand2 = random(sizeof(Y_OBJETO));
- if((newkeys & KEY_FIRE || oldkeys & KEY_FIRE ) && IsPlayerInRangeOfPoint(playerid, 200.0 , X_OBJETO[rand][0] , Y_OBJETO[rand2][0] , 0.0))
- {
- static
- Float:xPos,
- Float:yPos,
- Float:zPos,
- Float:distancia,
- Float:aPos;
- GetPlayerPos(playerid, xPos, yPos, zPos);
- GetPlayerFacingAngle(playerid, aPos);
- distancia = floatsqroot(floatpower(floatabs(xPos-X_OBJETO[rand][0]), 2) + floatpower(floatabs(yPos-Y_OBJETO[rand2][0]), 2));
- if(distancia < 100.0)
- {
- xPos += (distancia * floatsin(-aPos, degrees)),
- yPos += (distancia * floatcos(-aPos, degrees));
- distancia = floatsqroot(floatpower(floatabs(xPos-X_OBJETO[rand][0]), 2) + floatpower(floatabs(yPos-Y_OBJETO[rand2][0]), 2));
- SendClientMessage(playerid,Rojo,"[EXELENTE]: {F6F8F5}Mataste un venado y ganaste $1.000");
- DestroyObject(Bambi[playerid]);
- GivePlayerMoney(playerid, 1000);
- Bambi[playerid] = CreateObject(19315, BambisObj[rand3][0], BambisObj[rand3][1], BambisObj[rand3][2], 0.0, 0.0, 0.0);
- }
- }
- return 1;
- }
- CMD:cazar(playerid, params[])
- {
- new rand3 = random(sizeof(BambisObj));
- if(IsPlayerInRangeOfPoint(playerid, 1.0, -1634.8252,-2244.1931,31.4766))
- {
- if(PlayerInfo[playerid][pCazador] == 0){}else return SendClientMessage(playerid,Rojo,"Error: Ya tienes este empleo");
- PlayerInfo[playerid][pCazador] = 1;
- SendClientMessage(playerid,Rojo,"{FD0303}||--------------------------------------------------------------------");
- SendClientMessage(playerid,Rojo,"{FD0303}||------------------{2DFD03}FELICIDADES TIENES UN NUEVO EMPLEO{FD0303}----------------");
- SendClientMessage(playerid,Rojo,"{FD0303}||--------------------------------{2DFD03}CAZADOR{FD0303}-----------------------------");
- SendClientMessage(playerid,Rojo,"{FD0303}||--------------------------------------------------------------------");
- SendClientMessage(playerid,Rojo,"[INFO]: {F6F8F5}Busca y captura venados");
- Bambi[playerid] = CreateObject(19315, BambisObj[rand3][0], BambisObj[rand3][1], BambisObj[rand3][2], 0.0, 0.0, 0.0);
- }
- return 1;
- }
- CMD:renunciar(playerid, params[])
- {
- if(PlayerInfo[playerid][pCazador] == 1){}else return SendClientMessage(playerid,Rojo,"Error: No tienes este empleo");
- PlayerInfo[playerid][pCazador] = 0;
- SendClientMessage(playerid,Rojo,"[INFO]: {F6F8F5}Dejaste el empleo de cazador");
- DestroyObject(Bambi[playerid]);
- return 1;
- }
- //comandos de test
- CMD:irx(playerid, params[])
- {
- SetPlayerPos(playerid,-1687.25427, -2168.04907, 38.27590);
- return 1;
- }
- CMD:irx2(playerid, params[])
- {
- SetPlayerPos(playerid,-1639.22363, -2314.11646, 59.25200);
- return 1;
- }
- CMD:irx3(playerid, params[])
- {
- SetPlayerPos(playerid,-1513.02942, -2167.67188, 0.51030);
- return 1;
- }
- CMD:irx4(playerid, params[])
- {
- SetPlayerPos(playerid,-1769.84949, -2338.39404, 44.43521);
- return 1;
- }
- CMD:irx5(playerid, params[])
- {
- SetPlayerPos(playerid,-1720.98523, -2021.65540, 71.04913);
- return 1;
- }
- CMD:irx6(playerid, params[])
- {
- SetPlayerPos(playerid,-1411.85046, -2038.05493, 0.60150);
- return 1;
- }
- CMD:irx7(playerid, params[])
- {
- SetPlayerPos(playerid,-1353.24121, -2418.34351, 31.89130);
- return 1;
- }
- CMD:irx8(playerid, params[])
- {
- SetPlayerPos(playerid,-1487.88245, -2570.38428, 71.90640);
- return 1;
- }
- CMD:irx9(playerid, params[])
- {
- SetPlayerPos(playerid,-1610.81677, -2694.43848, 48.01360);
- return 1;
- }
- CMD:irx10(playerid, params[])
- {
- SetPlayerPos(playerid,-1241.92603, -2334.24463, 18.44890);
- return 1;
- }
- stock pName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- return name;
- }
- /* FS CREADO POR STRIKE
- BRUNO DA SILVA SCRIPT DETECTAR DISPARO*/
- // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement