Jump to content

Young Crooi

VIP
  • Posts

    571
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by Young Crooi

  1. Forest Arena Forest Arena is an Arena where you have to survive, find your weapons and kill the other players, on this arena, you can not see other people name, so it is harder to survive. Commands /openfa - Open the Arena (ONLY RCON) /closefa - Close the Arena (ONLY RCON) /fa - Join Arena /quitfa - quit Arena Weapons Weapons are Spawned randomly every time the arena is open AK-47 MP5 Desert Eagle Shotgun Katana Silenced Pistol Country Rifle Sniper Rifle Thermal Goggles Spawn You can Spawn on 6 randomly places, when you spawn your nick is disable. Video [ame] [/ame] Music: Ellie Goulding - High For This (Omega Dubstep Bootleg) Download Code:// --------------------------------------------------- // // ----------- FILTER SCRIPT: FOREST ARENA ----------- // // --------------- Map: Totola(Jumper) -------------- // // --------------- Code: Totola(Jumper) -------------- // // --------------------------------------------------- // // ---------------------{INCLUDE'S}------------------- // #include <a_samp> #include <ZCMD> // -----------------------{NEW'S}--------------------- // new TotolaForest; new noTotForest[MAX_PLAYERS]; new Float:RandomTotola[][3] = { {-1089.2100,-933.9091,129.2188}, // SPAWN 1 {-1089.4825,-1044.7700,129.2119}, // SPAWN 2 {-1194.7784,-1045.4269,129.2188}, // SPAWN 3 {-1180.6783,-923.7373,129.2119}, // SPAWN 4 {-1007.3196,-915.4716,129.2188}, // SPAWN 5 {-1010.9894,-1060.1567,129.2188} // SPAWN 6 }; new armas[] = { 355, 353, 348, 349, 339, 347, 358, 357, 369 }; new pickup1, pickup2, pickup3, pickup4, pickup5, pickup6, pickup7, pickup8, pickup9, pickup10, pickup11, pickup12, pickup13, pickup14, pickup15, pickup16; // --------------------{CALL BACK'S}------------------ // public OnFilterScriptInit() { print("\n --------------------------------------------------- "); print(" --------------- FOREST ARENA CARREGADA -------------- "); print(" ---------------- By: Totola(Jumper) ---------------- "); print(" --------------------------------------------------- \n"); TotolaForest = 0; // --------------------{<MAPA>}------------------ // AddStaticVehicleEx(522,-1191.9000244,-976.9000244,137.6999969,268.0000000,132,4,15); //NRG-500 CreateObject(972,-1005.0000000,-923.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (1) CreateObject(972,-1005.0000000,-948.2000122,128.1999969,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (2) CreateObject(972,-1005.0000000,-973.0000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (3) CreateObject(972,-1005.0000000,-997.7999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (4) CreateObject(972,-1005.0999756,-1022.2999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (5) CreateObject(972,-1005.0000000,-1047.1999512,128.1999969,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (6) CreateObject(972,-1005.0999756,-1056.0000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (7) CreateObject(972,-1016.2000122,-1062.9000244,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (8) CreateObject(972,-1041.0000000,-1063.0000000,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (9) CreateObject(972,-1065.6999512,-1062.9000244,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (10) CreateObject(972,-1090.6999512,-1062.8000488,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (11) CreateObject(972,-1115.5000000,-1062.9000244,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (12) CreateObject(972,-1140.4000244,-1063.0000000,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (13) CreateObject(972,-1165.1999512,-1062.9000244,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (14) CreateObject(972,-1189.1999512,-1063.0999756,128.1999969,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (15) CreateObject(972,-1195.6999512,-1052.0000000,128.1999969,0.0000000,0.0000000,180.0000000); //object(tunnelentrance) (16) CreateObject(972,-1195.6999512,-1027.1999512,128.1999969,0.0000000,0.0000000,179.9945068); //object(tunnelentrance) (17) CreateObject(972,-1195.6999512,-1002.4000244,128.1999969,0.0000000,0.0000000,179.9945068); //object(tunnelentrance) (18) CreateObject(972,-1195.8000488,-977.7999878,128.1999969,0.0000000,0.0000000,179.9945068); //object(tunnelentrance) (19) CreateObject(972,-1195.8000488,-953.0999756,128.1999969,0.0000000,0.0000000,179.9945068); //object(tunnelentrance) (20) CreateObject(972,-1187.5000000,-933.4000244,128.1999969,0.0000000,0.0000000,141.9945068); //object(tunnelentrance) (21) CreateObject(972,-1169.6999512,-918.9000244,128.1999969,0.0000000,0.0000000,119.9927979); //object(tunnelentrance) (22) CreateObject(972,-1148.0000000,-914.0000000,128.1999969,0.0000000,0.0000000,90.0000000); //object(tunnelentrance) (23) CreateObject(972,-1123.0999756,-914.0000000,128.1999969,0.0000000,0.0000000,90.0000000); //object(tunnelentrance) (24) CreateObject(972,-1098.3000488,-913.9000244,128.1999969,0.0000000,0.0000000,90.0000000); //object(tunnelentrance) (25) CreateObject(972,-1073.5999756,-913.7999878,128.1999969,0.0000000,0.0000000,90.0000000); //object(tunnelentrance) (26) CreateObject(972,-1048.8000488,-913.9000244,128.1999969,0.0000000,0.0000000,90.0000000); //object(tunnelentrance) (27) CreateObject(972,-1023.9000244,-913.9000244,128.1999969,0.0000000,0.0000000,90.0000000); //object(tunnelentrance) (28) CreateObject(972,-1004.5000000,-913.9000244,128.1999969,0.0000000,0.0000000,90.0000000); //object(tunnelentrance) (29) CreateObject(11095,-1108.5999756,-995.7000122,133.3999939,0.0000000,0.0000000,0.0000000); //object(stadbridge_sfs) (1) CreateObject(11095,-1040.5000000,-945.5999756,133.1999969,0.0000000,0.0000000,50.0000000); //object(stadbridge_sfs) (2) CreateObject(790,-1179.3000488,-943.7999878,127.5000000,0.0000000,0.0000000,211.3824463); //object(sm_fir_tallgroup) (1) CreateObject(790,-1113.3000488,-1012.4000244,127.0000000,0.0000000,0.0000000,171.3824463); //object(sm_fir_tallgroup) (2) CreateObject(790,-1050.9000244,-945.0000000,128.1999969,0.0000000,0.0000000,211.3824463); //object(sm_fir_tallgroup) (3) CreateObject(791,-1052.5999756,-974.2999878,127.5000000,0.0000000,0.0000000,0.0000000); //object(vbg_fir_copse) (1) CreateObject(791,-1160.8000488,-1007.9000244,123.5000000,352.0000000,0.0000000,0.0000000); //object(vbg_fir_copse) (2) CreateObject(790,-1165.6999512,-1053.1999512,128.1999969,0.0000000,0.0000000,171.3812256); //object(sm_fir_tallgroup) (4) CreateObject(790,-1143.0999756,-1035.0999756,128.1999969,0.0000000,0.0000000,141.3812256); //object(sm_fir_tallgroup) (5) CreateObject(790,-1088.5999756,-931.2000122,128.1999969,0.0000000,0.0000000,141.3775635); //object(sm_fir_tallgroup) (6) CreateObject(790,-1029.0000000,-1054.5999756,128.1999969,0.0000000,0.0000000,141.3775635); //object(sm_fir_tallgroup) (7) CreateObject(790,-1040.6999512,-1051.0000000,128.1999969,0.0000000,0.0000000,121.3775635); //object(sm_fir_tallgroup) (8) CreateObject(17324,-1076.9000244,-1037.6999512,128.0000000,0.0000000,0.0000000,142.0000000); //object(cw_combbarn) (1) CreateObject(3279,-1151.5999756,-999.0999756,128.1999969,0.0000000,0.0000000,0.0000000); //object(a51_spottower) (1) CreateObject(3279,-1049.0999756,-968.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(a51_spottower) (2) CreateObject(3279,-1039.5999756,-1041.3000488,128.1999969,0.0000000,0.0000000,0.0000000); //object(a51_spottower) (3) CreateObject(727,-1011.7999878,-951.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (1) CreateObject(727,-1019.9000244,-917.7999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (2) CreateObject(727,-1019.0999756,-946.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (3) CreateObject(727,-1008.4000244,-919.7999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (4) CreateObject(727,-1028.4000244,-936.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (5) CreateObject(727,-1019.9000244,-927.7999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (6) CreateObject(727,-1009.0000000,-938.7000122,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (7) CreateObject(727,-1049.4000244,-922.7000122,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (8) CreateObject(727,-1037.0000000,-929.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (9) CreateObject(727,-1035.9000244,-917.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (10) CreateObject(727,-1177.5999756,-921.2000122,132.5000000,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (11) CreateObject(727,-1150.1999512,-920.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (12) CreateObject(727,-1168.6999512,-925.7000122,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (13) CreateObject(727,-1134.8000488,-930.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (14) CreateObject(727,-1115.3000488,-927.2999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (15) CreateObject(727,-1131.5000000,-919.2999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (16) CreateObject(727,-1122.0000000,-934.7999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (17) CreateObject(727,-1100.5999756,-915.7000122,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (18) CreateObject(727,-1103.4000244,-943.5999756,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (19) CreateObject(727,-1071.9000244,-947.9000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (20) CreateObject(727,-1103.0000000,-928.5000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (21) CreateObject(727,-1160.5999756,-932.2999878,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (22) CreateObject(727,-1137.0999756,-942.9000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (23) CreateObject(727,-1150.3000488,-931.4000244,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (24) CreateObject(727,-1125.1999512,-944.5999756,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (25) CreateObject(727,-1172.5000000,-940.5000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (26) CreateObject(727,-1160.6999512,-939.0999756,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (27) CreateObject(727,-1183.0999756,-946.5000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (28) CreateObject(727,-1191.0999756,-953.0000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (29) CreateObject(790,-1103.3000488,-1053.3000488,128.1999969,0.0000000,0.0000000,121.3812256); //object(sm_fir_tallgroup) (9) CreateObject(790,-1059.8000488,-1048.9000244,128.1999969,0.0000000,0.0000000,121.3769531); //object(sm_fir_tallgroup) (10) CreateObject(3268,-1189.0999756,-977.0000000,128.1999969,0.0000000,0.0000000,180.0000000); //object(mil_hangar1_) (1) CreateObject(790,-1189.3000488,-1028.1999512,128.1999969,0.0000000,0.0000000,171.3812256); //object(sm_fir_tallgroup) (11) CreateObject(790,-1126.4000244,-933.4000244,128.1999969,0.0000000,0.0000000,171.3812256); //object(sm_fir_tallgroup) (12) CreateObject(790,-1057.9000244,-1014.0000000,128.8999939,0.0000000,0.0000000,171.3812256); //object(sm_fir_tallgroup) (13) CreateObject(790,-1159.1999512,-960.4000244,128.1999969,0.0000000,0.0000000,171.3812256); //object(sm_fir_tallgroup) (14) CreateObject(5262,-1193.5000000,-987.4000244,131.0000000,0.0000000,0.0000000,270.0000000); //object(las2dkwar04) (1) CreateObject(5269,-1186.4000244,-966.2000122,130.5000000,0.0000000,0.0000000,0.0000000); //object(las2dkwar05) (1) CreateObject(5269,-1197.8000488,-978.5000000,130.5000000,0.0000000,0.0000000,0.0000000); //object(las2dkwar05) (2) CreateObject(7040,-1086.6999512,-935.9000244,131.6000061,0.0000000,0.0000000,0.0000000); //object(vgnplcehldbox01) (1) CreateObject(3374,-1105.0000000,-977.5999756,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (1) CreateObject(3374,-1105.5000000,-982.5000000,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (2) CreateObject(10814,-1086.3000488,-989.2000122,132.3000031,0.0000000,0.0000000,0.0000000); //object(apfuel2_sfse) (1) CreateObject(13489,-1021.9000244,-1023.5000000,130.8000031,0.0000000,0.0000000,0.0000000); //object(sw_fueldrum04) (1) CreateObject(13489,-1021.2999878,-1012.7999878,130.8000031,0.0000000,0.0000000,0.0000000); //object(sw_fueldrum04) (2) CreateObject(727,-1038.5000000,-1031.1999512,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (30) CreateObject(727,-1018.0999756,-1030.6999512,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (31) CreateObject(727,-1035.1999512,-1018.0000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (32) CreateObject(727,-1025.5999756,-985.0000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (33) CreateObject(727,-1009.9000244,-1013.5000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (34) CreateObject(727,-1028.5000000,-999.0000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (35) CreateObject(790,-1143.5000000,-982.7999878,128.1999969,0.0000000,0.0000000,211.3824463); //object(sm_fir_tallgroup) (15) CreateObject(790,-1085.8000488,-965.2000122,128.1999969,0.0000000,0.0000000,211.3824463); //object(sm_fir_tallgroup) (16) CreateObject(790,-1052.5000000,-1038.0999756,128.1999969,0.0000000,0.0000000,211.3824463); //object(sm_fir_tallgroup) (17) CreateObject(790,-1128.3000488,-999.5999756,128.1999969,0.0000000,0.0000000,211.3824463); //object(sm_fir_tallgroup) (18) CreateObject(790,-1118.0999756,-1053.0000000,128.1999969,0.0000000,0.0000000,211.3824463); //object(sm_fir_tallgroup) (19) CreateObject(16599,-1146.5000000,-1052.4000244,133.0000000,0.0000000,0.0000000,0.0000000); //object(by_fuel06) (1) CreateObject(16599,-1140.8000488,-1052.0999756,133.0000000,0.0000000,0.0000000,0.0000000); //object(by_fuel06) (2) CreateObject(8493,-1176.4000244,-1027.5999756,142.1000061,0.0000000,0.0000000,336.0000000); //object(pirtshp01_lvs) (1) CreateObject(972,-1195.6999512,-1052.0000000,135.3999939,0.0000000,0.0000000,179.9945068); //object(tunnelentrance) (30) CreateObject(972,-1189.0999756,-1063.0999756,135.5000000,0.0000000,0.0000000,270.0000000); //object(tunnelentrance) (31) CreateObject(11440,-1130.5999756,-1016.9000244,127.5999985,0.0000000,0.0000000,0.0000000); //object(des_pueblo1) (1) CreateObject(11440,-1075.5999756,-973.4000244,127.6999969,0.0000000,0.0000000,0.0000000); //object(des_pueblo1) (2) CreateObject(11440,-1137.0000000,-956.9000244,127.6999969,0.0000000,0.0000000,40.0000000); //object(des_pueblo1) (3) CreateObject(11457,-1011.4000244,-993.2999878,127.8000031,0.0000000,0.0000000,0.0000000); //object(des_pueblo09) (1) CreateObject(972,-1005.2000122,-1004.0000000,135.0000000,0.0000000,0.0000000,0.0000000); //object(tunnelentrance) (32) CreateObject(11459,-1150.1999512,-1035.9000244,128.1000061,0.0000000,0.0000000,0.0000000); //object(des_pueblo11) (1) CreateObject(11459,-1049.5999756,-1048.6999512,128.1000061,0.0000000,0.0000000,0.0000000); //object(des_pueblo11) (2) CreateObject(18256,-1092.9000244,-988.5999756,132.8999939,0.0000000,0.0000000,4.7039795); //object(w7bark01) (1) CreateObject(11544,-1107.6999512,-992.0999756,139.0000000,0.0000000,0.0000000,0.0000000); //object(des_ntfrescape2) (1) CreateObject(5269,-1184.0000000,-978.4000244,130.5000000,0.0000000,0.0000000,268.0000000); //object(las2dkwar05) (3) CreateObject(727,-1171.0999756,-963.5000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (36) CreateObject(727,-1164.3000488,-983.2000122,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (37) CreateObject(727,-1158.0000000,-969.0000000,128.1999969,0.0000000,0.0000000,0.0000000); //object(tree_hipoly04) (38) CreateObject(17007,-1042.4000244,-1013.9000244,128.0000000,0.0000000,0.0000000,0.0000000); //object(wt6supps01) (1) CreateObject(17067,-1123.8000488,-1039.0000000,128.0000000,0.0000000,0.0000000,98.0000000); //object(cw2_logcabins) (1) CreateObject(3374,-1100.5999756,-980.5000000,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (3) CreateObject(3374,-1102.5000000,-980.7000122,132.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (4) CreateObject(3374,-1118.9000244,-929.9000244,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (5) CreateObject(3374,-1112.4000244,-931.4000244,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (6) CreateObject(3374,-1112.5000000,-931.2000122,132.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (7) CreateObject(3374,-1166.3000488,-993.2000122,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (8) CreateObject(3374,-1162.5999756,-990.4000244,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (9) CreateObject(3374,-1018.5999756,-1047.8000488,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (10) CreateObject(3374,-1018.7000122,-1043.4000244,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (11) CreateObject(3374,-1018.7999878,-1044.9000244,132.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (12) CreateObject(3374,-1164.5000000,-1029.8000488,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (13) CreateObject(3374,-1160.5000000,-1029.6999512,129.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (14) CreateObject(3374,-1162.4000244,-1029.8000488,132.6999969,0.0000000,0.0000000,0.0000000); //object(sw_haybreak02) (15) return 1; } public OnPlayerConnect(playerid) { noTotForest[playerid] = 0; return 1; } public OnPlayerDeath(playerid, killerid, reason) { noTotForest[playerid] = 0; for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) ShowPlayerNameTagForPlayer(playerid, i, true); return 1; } stock Nome(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name; } // -----------------------{COMANDOS}--------------------- // CMD:openfa(playerid) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000,"ERROR: You can not do this."); if(TotolaForest == 1) return SendClientMessage(playerid, 0xFF0000,"ERROR: Forest Arena is already Opened"); TotolaForest = 1; SendClientMessageToAll(0x228B22FF , "[INFO]Forest Arena is Open!! [{FFFFFF}Type /FA to Join{228B22}]"); SendClientMessage(playerid, -1, "|| WARNING ADM! Close it with: /closefa"); pickup1 = CreatePickup(armas[random(sizeof(armas))], 2, -1039.7949,-1040.9695,136.8782, -1); pickup2 = CreatePickup(armas[random(sizeof(armas))], 2, -1016.2387,-1000.2385,129.2126, -1); pickup3 = CreatePickup(armas[random(sizeof(armas))], 2, -1048.8966,-968.5367,136.8782, -1); pickup4 = CreatePickup(armas[random(sizeof(armas))], 2, -1071.1217,-965.7619,129.2188, -1); pickup5 = CreatePickup(armas[random(sizeof(armas))], 2, -1067.1025,-925.1772,137.7380, -1); pickup6 = CreatePickup(armas[random(sizeof(armas))], 2, -1017.8635,-968.2134,137.7380, -1); pickup7 = CreatePickup(armas[random(sizeof(armas))], 2, -1115.4080,-929.7350,129.2188, -1); pickup8 = CreatePickup(armas[random(sizeof(armas))], 2, -1138.1083,-949.5615,129.2188, -1); pickup9 = CreatePickup(armas[random(sizeof(armas))], 2, -1110.4128,-961.2980,137.9380, -1); pickup10 = CreatePickup(armas[random(sizeof(armas))], 2, -1083.3379,-1007.6152,137.8681, -1); pickup11 = CreatePickup(armas[random(sizeof(armas))], 2, -1082.4080,-1044.4351,129.2188, -1); pickup12 = CreatePickup(armas[random(sizeof(armas))], 2, -1127.6932,-1010.8391,129.2188, -1); pickup13 = CreatePickup(armas[random(sizeof(armas))], 2, -1116.6295,-1039.6604,129.2119, -1); pickup14 = CreatePickup(armas[random(sizeof(armas))], 2, -1152.5444,-999.4540,136.8782, -1); pickup15 = CreatePickup(armas[random(sizeof(armas))], 2, -1177.8857,-1028.4845,131.6466, -1); pickup16 = CreatePickup(armas[random(sizeof(armas))], 2, -1192.3844,-987.4376,129.2188, -1); return 1; } CMD:closefa(playerid) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000,"ERROR: You can not do this"); if(TotolaForest == 0) return SendClientMessage(playerid,0xFF0000,"ERROR: Forest Arena is already Closed"); TotolaForest = 0; SendClientMessageToAll(0x228B22FF , "[INFO] The {FFFFFF}FOREST ARENA{228B22} is Closed!"); DestroyPickup(pickup1); DestroyPickup(pickup2); DestroyPickup(pickup3); DestroyPickup(pickup4); DestroyPickup(pickup5); DestroyPickup(pickup6); DestroyPickup(pickup7); DestroyPickup(pickup8); DestroyPickup(pickup9); DestroyPickup(pickup10); DestroyPickup(pickup11); DestroyPickup(pickup12); DestroyPickup(pickup13); DestroyPickup(pickup14); DestroyPickup(pickup15); DestroyPickup(pickup16); return 1; } CMD:fa(playerid) { if(TotolaForest == 0) return SendClientMessage(playerid,0xFF0000,"ERROR: Forest Arena is Closed"); if(noTotForest[playerid] == 1) return SendClientMessage(playerid,0xFF0000,"ERROR: You are already in Forest Arena !"); new rand = random(sizeof(RandomTotola)); SetPlayerPos(playerid, RandomTotola[rand][0], RandomTotola[rand][1],RandomTotola[rand][2]); ResetPlayerWeapons(playerid); new string[100]; format(string,sizeof(string), "[INFO] %s went to {FF0000}Forest Arena{FFA07A} [/FA]",Nome(playerid)); SendClientMessageToAll(0xFFA07AFF, string); SendClientMessage(playerid, 0xCECEFF7D, "Forest Arena by: Totola(Jumper)"); SendClientMessage(playerid, 0xCECEFF7D, "You Have To survive !"); SendClientMessage(playerid, 0xCECEFF7D, "Weapons are hidden on the map !"); SendClientMessage(playerid, 0xCECEFF7D, "Find Guns and Kill the other Players !"); SendClientMessage(playerid, 0xCECEFF7D, "PS: Here, The NickNames are Invisible !"); SendClientMessage(playerid, 0xCECEFF7D, "If you want to Quit: /quitfa, Good Luck!"); GivePlayerWeapon(playerid, 29, 60); SetPlayerHealth(playerid, 40); SetPlayerArmour(playerid, 0); noTotForest[playerid] = 1; for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) ShowPlayerNameTagForPlayer(playerid, i, false); return 1; } CMD:quitfa(playerid) { if(noTotForest[playerid] == 0) return SendClientMessage(playerid,0xFF0000,"ERROR: You are not in Forrest Arena !"); SpawnPlayer(playerid); noTotForest[playerid] = 0; for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) ShowPlayerNameTagForPlayer(playerid, i, true); return 1; }
  2. Hey Guys! Im A Beginner Scripter Tell me if there is any errors or something to fix \ improve. // SIMPLE PM \\ Code:///// Script By AviPeker ////// /// ~~~ SIMPLE PM ~~~ /// #include <a_samp> #include "../include/gl_common.inc" #define COLOR_RED 0xFF444499 #define IN_COMING_PM 0xFFFF22AA #define OUT_GOING_PM 0xFFCC2299 //------------------------------------------------ public OnFilterScriptInit() { print("\n Simple PM loaded .\n"); return 1; } //------------------------------------------------ public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new tmp[256]; new Message[256]; new gMessage[256]; new pName[MAX_PLAYER_NAME+1]; new iName[MAX_PLAYER_NAME+1]; new idx; cmd = strtok(cmdtext, idx); // PM Command if(strcmp("/pm", cmd, true) == 0) { tmp = strtok(cmdtext,idx); if(!strlen(tmp) || strlen(tmp) > 5) { SendClientMessage(playerid,COLOR_RED,"ERROR: /pm [id] (message)"); return 1; } new id = strval(tmp); gMessage = strrest(cmdtext,idx); if(!strlen(gMessage)) { SendClientMessage(playerid,COLOR_RED,"ERROR: /pm [id] (message)"); return 1; } if(!IsPlayerConnected(id)) { SendClientMessage(playerid,COLOR_RED,"Player not Found"); return 1; } if(playerid != id) { GetPlayerName(id,iName,sizeof(iName)); GetPlayerName(playerid,pName,sizeof(pName)); format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage); SendClientMessage(playerid,OUT_GOING_PM,Message); format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage); SendClientMessage(id,IN_COMING_PM,Message); PlayerPlaySound(id,1085,0.0,0.0,0.0); printf("PM: %s",Message); } else { SendClientMessage(playerid,COLOR_RED,"ERROR: You cant PM yourself"); } return 1; } } __________________
  3. This is my first filterscript I made, I got the idea from LS-RP damage system and then I trying to code that system, hope you enjoy this one. I just found a bug if the dialog characters reached 1000+ it'll be cut, if you found some you can reply on this thread. And also please, do not re-release and claim this as yours. Pict: Credits: LS-RP for the idea and Hreesang Sorry for the bad english [Protected content]
  4. Intro: This system consists of upgrading player desired weapon skills by shooting small bottles objects. There are 11 slots and 3 positions for each slot bottle which control the training difficulty. Shooting difficulty does also depend on the weapon you choose; example: using sniper rifle you could easily destroy the 3 bottles from the first attempts, while using 9mm will decreasing destroying objects from the first attempts, as the video shows. Weapon Skills are saved in player variables that can be checked using /myskills. OIn order to start training, you have to use /train. Do not worry about loosing your position and your weapons, they will be saved and you get them back just after the training! This system is really simple and basic, I will update it, optimize the codes and add more features as soon as I get more free time :l Commands: /myskills /train Video: Download and Credits: Thanks to samp team for a_samp and Zeex for zcmd, pastebin link: [Protected content]
  5. How it works This include is actually a kind of event with gift boxes who is activate by a function and disable by another. Isn't complicated because i added a description for every function in my code. Well, about how it works, system is easy: someone start the event and on the map will be placed in different and random places those gift boxes. When a player pick up a gift box will receive a reward who is set by the owner/founder in gamemode. Functions Code:InitiateGifts(); //This function creates giftboxes and resets variables to default. DestroyGifts(); //This function destroys every giftbox and resets variables to default. CheckGift(playerid,pickupid); //You must insert this function in your OnPlayerPickUpPickup public from your gamemode. public PlayerGiftReward(playerid,pickupid); //You must use this public in your gamemode in order to set a bonus for the player to receive when he picks up a giftbox. Read this (important) If you will use this include, you have to know few things: InitiateGifts(); - This function creates giftboxes and will start the event. DestroyGifts(); - This function destroys all the gift boxes and will stop the event. CheckGift(playerid,pickupid); - You must insert this function in OnPlayerPickUpPickup public! If you didn't, the player can't take the gift box. public PlayerGiftReward(playerid,pickupid); - This public will be called every time when a player pick up a gift box. So, you can add a reward. Look in include: new Float:GiftPos[][] - This array have giftboxes positions. If you want to add more, all you have to do is to edit this array. And, that's all. Video http://youtu.be/vitV80cefnA Download [Protected content]
  6. AFK Auto-Detector[v0.2] Introduction This include will show you in console when a player is on pause mode or when a player resume the game after he went AFK. All of this, automatically, without commands like /afk; /sleep ... The include detects the player after 6 seconds in Pause mode. This include can detect: - When a player is AFK. - When a player is no longer AFK. Screenshot: New functions: Code:public OnPlayerPause(playerid) //Called when the player is AFK public OnPlayerUnpause(playerid) //Called when the player is back in game or left the game when is AFK. IsPlayerPause(playerid) //Show the value 1(AFK) or 0('NON-AFK') TimeSincePaused(playerid) //Show the current AFK time from a player when he's afk or when is no longer afk, shows last AFK time. You can see the AFK players by using this command. Code: CMD:afklist(playerid) { new count,name[32],string[100]; SendClientMessage(playerid,0x17A631FF,"________ AFK Players ________"); foreach(Player, i) { if(IsPlayerPause(i)) { GetPlayerName(i,name,sizeof(name)); format(string,sizeof(string),"%s [%d]",name,i); SendClientMessage(playerid,-1,string); } } return 1; } DOWNLOAD - [Protected content] - [Protected content]
  7. AntiDesktopDialog v0.2 Hi guys! I present to you the ultimate include to prevent wrong processes of answered dialogs! Storyline: Quote:You all know it, you're on your desktop and something ingame happens. You get a dialog-window! So now, you want to re-enter the game. How do you do it? With return or ESC. Damn! There's been some important stuff to read and you didn't see it! What to do? The Answer: Use this include! It prevents incorrect dialogs being sent and shows up the dialog again! Simple and clever! All you have to do is to include it into your scripts (or a_samp.inc?). Code:#include <AntiDesktopDialog> Warning: If you've got a very big script, it could be that you're using very large dialogs (e.g. /stats). So you have to change the arraysize in line 49! Code:new varstring[256]; Changelog: [v0.2]: Fixed an issue where dialogs for playerIDs did not hide after a relog/disconnect. [v0.1]: First Release Here you go: [Protected content]
  8. It is my new version Anty Money Hack. In this version added: * PVar's * Improved optimization of code * Instead, the script is now include Use: Add on top of the map: Code: #include <m_money> In your map change: GivePlayerMoney on m_GivePlayerMoney SetPlayerMoney on m_SetPlayerMoney ResetPlayerMoney on m_ResetPlayerMoney In OnPlayerUpdate add m_MoneyUpdate(playerid); Example: Code: public OnPlayerUpdate(playerid) { m_MoneyUpdate(playerid); return 1; } Download: Pastebin: [Protected content] SendSpacep [Protected content]
  9. zTime Date/Time functions Time is a simple include functions for get or manipulate time data, either in what day falls the date that is, obtain data quickly in various formats (see functions that obtain the date in a format established and individual functions to sort in another for the moment not there function to sort time-data without a function which have a absolute format).[/size] FUNCIONES. Code: v 1 * GetDayOfWeek(day, month, year); - get the name of a day from week from an date specific * GetDate(); - get date in format "Sábado 23 de Agosto del 2014". * GetTime(); - get time in format "08:47:56". * GetMonthName(month); - get the month name * IsLeapDay(year); - check if is leap-day (thank's to http://es.wikipedia.org/wiki/Añ..._computacional) v 1.1 - Last UPDATE [CHANGE] GetDate(); before it show: "21 Monday, March, 2016", now prints: "21 Monday, March, 2016 - 03:19 PM [ADD] getTotalDaysInMonth(_month, year) - get total day's in a specific month [ADD] GetSpecificDate(day = -1, month = -1, year = -1); get date in format: "21 Monday, March, 2016", this function is to get specific date, no today. To get date from now the function is GetDate() but without the time. [ADD] GetTotalDaysFromYear(year) get the total day's from a year, taking into consideration leap-years [ADD] GetLeftDaysFromYear(day, _month, year) get the total day's which left in a year. [ADD] CountDaysSpentInYear(day, _month, Year) obtain the total of days that have passed in the year // allow get the date in variables, when we add month or days. If is 22/03/2016 and we add +15 days, this not will be 36/03/2016, this function allow apply the date sintax, therefore will be 06/04/2016. (applying the format although be 29/12/2016, and we add 5 days). [ADD] GetDateDateAddingDays(days, months, _day, _month, _year, &dia, &mes, &year) ///////// [ADD] GetCurrentDateAddingDays(days, &dia, &mes, &year), its the same as GetDateDateAddingDays only wich here we add only days. [ADD] PrintDate() print now date in YYYY-MM-DD, HH:MM [ADD] DateToUnix(day, month, year) convert real time (day, month and year) to unix time. [ADD] UnixToDate(x, &_day, &_month, &_year) convert unix time to real time (day, month and year) * Functions of time to string - POSSIBLY TEMPORARY [ADD] GetDateFromStr_YYYYMMDDHHMM(str[], &day, &month, &year, &hour, &minute) convert date to format YYYY-MM-DD HH:MM (pass the vals to variables) [ADD] GetDateFromStr_DDMMYYYYHHMM(str[], &day, &month, &year, &hour, &minute) convert date to format DD-MM-YYYY HH:MM (pass the vals to variables) [ADD] FixFormatHour(hour, minute) convert time from 3:2 to 03:02. [ADD] convert24HoursTo12Hours(time[]) convert 24 hours time: 13:00 to 12 hours time: 01:00 PM. An example, is a code to know what day of the week / general date will be in the remaining days in the year.[/size] PHP Code: main() { new day, month, year, fecha[3] = {19,3,2016}; for(new i = 1; i < GetLeftDaysFromYear(fecha[0], fecha[1], fecha[2])-1; i++) { GetCurrentDateAddingDays(i+1, day, month, year); printf("%i. %s", i, GetSpecificDate(day, month, year)); //sleep(1000/4); } } CODE. PHP Code: /* zTime - _Zume */ #include <a_samp> #if !defined gettime_ex #define gettime_ex gettime #endif #define GetCurrentDate() GetSpecificDate(-1, -1, -1) #define IsLeapYear(%1) ((%1 % 4 == 0 && %1 % 100 != 0) || %1 % 400 == 0) stock GetDayOfWeek(day, month, year) // Basado en http://es.wikipedia.org/wiki/Congruencia_de_Zeller { static const DaysWeek[][24] = { "Monday", // 0 "Tuesday", // 1 "Wednesday", // 2 "Thursday", // 3 "Friday", // 4 "Saturday", // 5 "Sunday" // 6 }; new d_[4], m_[10] ; d_[0] = (14-month) / 12, d_[2] = year - d_[0], d_[1] = month + (12*d_[0]) - 2; d_[3] = (day + d_[2] + (d_[2]/4) - (d_[2]/100) + (d_[2]/400) + (31*d_[1]) / 12) % 7; if(d_[3] == 0) { d_[3] = sizeof(DaysWeek) - 1; } else { d_[3] -= 1; } format(m_, sizeof(m_), "%s", DaysWeek[d_[3]]); return m_; } stock GetDate() { new output[40]; new _dat[3]; gettime_ex(_dat[0], _dat[1], _dat[2]); format(output, sizeof(output), "%i:%i", _dat[0], _dat[1]); format(output, sizeof(output), "%s - %s", GetCurrentDate(), convert24HoursTo12Hours(output)); return output; } stock GetTime() { new m_[34], d_[3] ; gettime_ex(d_[0], d_[1], d_[2]), format(m_, sizeof(m_), "%02d:%02d", d_[0], d_[1], d_[2]); return m_; } stock GetMonthName(month) { static const MonhtsYears[12][] = { "January", // 0 "February", // 1 "March", // 2 "April", // 3 "May", // 4 "June", // 5 "July", // 6 "August", // 7 "September", // 8 "October", // 9 "November", // 10 "December" // 11 }; new month_str[24] ; if(month > 0 && month <= sizeof(MonhtsYears)) { format(month_str, sizeof(month_str), "%s", MonhtsYears[month-1]); } else{ format(month_str, sizeof(month_str), "Unknown"); } return month_str; } stock getTotalDaysInMonth(_month, year) { new dias[] = { 31, // Enero 28, // Febrero 31, // Marzo 30, // Abril 31, // Mayo 30, // Junio 31, // Julio 31, // Agosto 30, // Septiembre 31, // Octubre 30, // Noviembre 31 // Diciembre }; return ((_month >= 1 && _month <= 12) ? (dias[_month-1] + (IsLeapYear(year) && _month == 2 ? 1 : 0)) : 0); } stock GetSpecificDate(day = -1, month = -1, year = -1) { new str[64]; if(day == -1 && month == -1 && year == -1) { new _year, _month, _day; getdate(_year, _month, _day); format(str, sizeof(str), "%i %s, %s, %i", _day, GetDayOfWeek(_day, _month, _year), GetMonthName(_month), _year); } else { format(str, sizeof(str), "%i %s, %s, %i", day, GetDayOfWeek(day, month, year), GetMonthName(month), year); } return str; } stock GetTotalDaysFromYear(year) return IsLeapYear(year) ? 366 : 365; stock GetLeftDaysFromYear(day, _month, year) return GetTotalDaysFromYear(year) - CountDaysSpentInYear(day, _month, year); stock CountDaysSpentInYear(day, _month, Year) { new SumaDeDias = day; for(new i = 1; i <= _month-1; i++) SumaDeDias += getTotalDaysInMonth(i, Year); return SumaDeDias; } stock GetDateDateAddingDays(days, months, _day, _month, _year, &dia, &mes, &year) { return UnixToDate(DateToUnix(_day, _month, _year) + (days * (60 * 60 * 24) + months * (60 * 60 * 24 * 30)), dia, mes, year); } stock GetCurrentDateAddingDays(days, &dia, &mes, &year) { new _year, _month, _day; getdate(_year, _month, _day); GetDateDateAddingDays(days, 0, _day, _month, _year, dia, mes, year); return 1; } stock GetCurrentDateAddingMonths(months, &dia, &mes, &year) { new _year, _month, _day; getdate(_year, _month, _day); GetDateDateAddingDays(0, months, _day, _month, _year, dia, mes, year); return 1; } stock GetDateFromStr_YYYYMMDDHHMM(str[], &day, &month, &year, &hour, &minute) { // formato -> YYYY/mm/dd, hh:mm new numberStr[12]; strmid(numberStr, str, 8, 10); day = strval(numberStr); strmid(numberStr, str, 5, 7); month = strval(numberStr); strmid(numberStr, str, 0, 4); year = strval(numberStr); strmid(numberStr, str, 12, 14); hour = strval(numberStr); strmid(numberStr, str, 15, strlen(str)-1); minute = strval(numberStr); return 1; } stock GetDateFromStr_DDMMYYYYHHMM(str[], &day, &month, &year, &hour, &minute) { // formato -> dd/mm/YYYY, hh:mm new numberStr[12]; strmid(numberStr, str, 0, 2); day = strval(numberStr); strmid(numberStr, str, 3, 5); month = strval(numberStr); strmid(numberStr, str, 6, 10); year = strval(numberStr); strmid(numberStr, str, 12, 14); hour = strval(numberStr); strmid(numberStr, str, 15, strlen(str)-1); minute = strval(numberStr); return 1; } stock FixFormatHour(hour, minute) { // 6:3 convert to 06:03 new str[9]; new bool:fixedHour[2]; if(0 <= hour <= 9){ format(str, sizeof(str), "0%i", hour); fixedHour[0] = true; } if(0 <= minute <= 9){ format(str, sizeof(str), "%s:0%i", str, minute); fixedHour[1] = true; } if(fixedHour[0] == false){ format(str, sizeof(str), "%i", hour); } if(fixedHour[1] == false){ format(str, sizeof(str), "%s:%i", str, minute); } /* format(str, sizeof(str), "%02d:%02d", hour, minute); <-- This does not work, does not meet the need correctly. */ return str; } stock convert24HoursTo12Hours(time[]) { // 13:00 -> 01:00 PM new output[32]; new pos = strfind(time, ":"); strmid(output, time, 0, pos+1); new hora = strval(output); strmid(output, time, pos+1, strlen(time)); new minuto = strval(output); new _formatTime[3]; if(hora >= 13 && hora <= 24){ format(_formatTime, sizeof(_formatTime), "PM"); hora = hora - 12; } else if(hora >= 0 && hora <= 12){ format(_formatTime, sizeof(_formatTime), "AM"); } format(output, sizeof(output), "%s %s", FixFormatHour(hora, minuto), _formatTime); return output; } stock PrintDate() // YYYYMMDDHHMM { new output[40], _dat[6]; getdate(_dat[0], _dat[1], _dat[2]); gettime_ex(_dat[3], _dat[4], _dat[5]); format(output, sizeof(output), "%02d/%02d/%d, %02d:%02d", _dat[0], _dat[1], _dat[2], _dat[3], _dat[4]); return output; } stock DateToUnix(day, month, year) { new x = 0; for(new j = 1970; j < year; j++) { x += (60 * 60 * 24)* 365; if(IsLeapYear(j)){ x += (60*60)*24; } } month--; for (new i = 0; i < month; i++){ x += getTotalDaysInMonth(month, year) * 86400; } x += day * 86400; return x; } stock UnixToDate(x, &_day, &_month, &_year) { new year = 1970; new dia = 1; new mes = 1; while(x >= 86400) { x -= 86400; dia ++; if(dia > getTotalDaysInMonth(mes, year)) { dia = 1; mes ++; if(mes > 12) { year ++; mes = 1; } } } _day = dia; _month = mes; _year = year; return x; }
  10. Hi, this include provides some functionality (2 callbacks) for handling vehicle health and visual damage. Configurations: Code:VEHICLEDAMAGE_UPDATEINTERVAL [int (default 50)] (Interval of internal timer) VEHICLEDAMAGE_USE_TIMER [0/1(default)] (Uses the internal timer to calculate vehicle health changes, if active, otherwise VehicleDamageUpdater() has to be called manually) VEHICLEDAMAGE_FLIPVEH_IFNODMG [0(default)/1] (Flips the vehicle if &apply_health_damage = 0 && this is active && vehicle is upside down) Callbacks: Code:OnVehicleTakeDamage(vehicleid, driverid, &Float:amount, playerid, weaponid, &apply_health_damage); OnVehicleTakeVisualDamage(vehicleid, driverid, &apply_visual_damage); Example code: Code:public OnVehicleTakeDamage(vehicleid, driverid, &Float:amount, playerid, weaponid, &apply_health_damage) { if(IsPlayerAdmin(driverid)) { apply_health_damage = 0; if(playerid != INVALID_PLAYER_ID) { SendClientMessage(playerid, -1, "Don't touch my fancy ass car!"); SetPlayerHealth(playerid, -1); } } return 1; } This doesn't prevent damage, it just provides some easy ways to revert the damage or customize the amount of damage to be dealt. Github: [Protected content]
  11. Functions This is a simple include which will prevent your server from getting attacked by those pesky join/part bots. You can also limit how many connections can be made with your server from the same exact IP. This is because some bots do not flood connections, but instead join every few seconds, evading the Anti Flood. Code:#define IP_LIMIT 3 // = Max connections from one single IP #define Time_Limit 3500 // = The time span between connects, adjust it to your own specifications Change the IP_LIMIT if you are affraid of banning brothers, altho unlikely somebody will join with 3 computers. I believe this will be of much help to other server owners, as it is of help for myself. I used to use Kick(playerid) and just kick the flooders, but that wouldn't stop them from reconnecting 20 more times, so I've changed it to instantly ban if it identifies these attacks. This is pretty much secure and won't cause any threat to your regulars being banned. Tested & fully working. EDIT: After looking up some more information about these attacks I'd like to provide another simple piece of code that would help you against the attackers that use the samp NPC's. Add this to the code of OnPlayerConnect. Code:public OnPlayerConnect(playerid) { if(IsPlayerNPC(playerid)) { new server_IP[16]; format(server_IP, 16, "127.0.0.1"); if(strcmp(ConnIP,server_IP,true) != 0) { Ban(playerid); // Ban is the safest thing here, as if you kick, they can still flood you with endless connections return 0; } } return 1; } What this does is check if the NPC connecting has the IP 127.0.0.1, this is the local IP of your server and NPC always connect from that. So if the IP isn't 127.0.0.1, it means the NPC connecting is an attacker's bot. Downloads: [Protected content] [Protected content]
  12. Am observat ca sunt multe intrebari in general cum adaugi icon pe harta. Nu este greu si m-am gandit sa fac un tutorial 1.Cauti in gm linia: public OnPlayerConnect(playerid) si dupa { adaugi SetPlayerMapIcon( playerid, 1, coordonateX,coordonateY,coordonateZ,id icon, 0 );// icon car Pentru a vedea id cu iconurile intrati aici: http://wiki.sa-mp.com/wiki/MapIcons
  13. Sa incepem : Mergem la functia "public PayDay" iar dupa mesajul cu informatiile despre payday-ul primit adaugam asa : new h,m,s; // variabile de care ne vom folosi sa aflam ce ora este gettime(h,m,s); // obtinem si stocam timpul in variabilele definite mai sus Acum, dupa ce am aflat timpul, punem niste conditii si un mesaj daca este nevoie : if(h == oradorita && m == 0) { PlayerInfo[playerid][pExp] ++; // inlocuiesti cu variabila ta prin care citesti punctele de respect SendClientMessage(playerid, -1, "Ai primit doua puncte de respect ora aceatsa . Felicitari !"); // mesajul trimis player-ului la acea ora return 1; } Asta este tot . Pentru a pune mai multe ore pui mai multe conditii , de exemplu : if(h == oradorita && m == 0 || h == adouaoradorita && m == aldoileaminutdorit) // si tot asa Dar atentie, nu face linia prea mare pentru ca nu va fi suportata si iti va face probleme , daca vrei sa pui multe ore , o faci pe doua linii , daca vrei sa pui 5/6 ore e ok pe o linie , in fine, cred ca ai inteles . ATENTIE : In loc de oradorita vei pune ora la care vrei sa se dea doua puncte . Daca de exemplu vre la 8:00 PM vei pune 20 , daca vrei la 8:00 AM vei pune 8 .
  14. Este un tutorial simplu, dragut si util pentru o "securitate sporita" 1. Mergem la enum pInfo sau cum aveti voi si adaugam: pUnlocked, pPin[5], 2. La OnPlayerConnect si OnPlayerDisconnect, adaugam: PlayerInfo[playerid][pUnlocked] = 0; 3. Facem acum un nou callback: public CheckAccount(playerid); public CheckAccount(playerid) { new i; if(PlayerInfo[playerid][pUnlocked] == 0 && (strlen(PlayerInfo[playerid][pPin]) > 0)) { i = 0; } else i = 1; return i; } 4. Facem comenzile: CMD:pin(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); new pin[128]; if(PlayerInfo[playerid][pUnlocked] != 0) return SCM(playerid, COLOR_LIGHTRED, "You already unlocked your account."); if(sscanf(params, "s[128]", pin)) return SCM(playerid, COLOR_SYN, "Syntax: /unlockacc <4-digit-code>"); if(strlen(pin) != 4) return SCM(playerid, COLOR_SYN, "Syntax: /unlockacc <4-digit-code>"); if(!IsNumeric(pin)) return SCM(playerid, COLOR_SYN, "Syntax: /unlockacc <4-digit-code>"); if(!strcmp(pin, PlayerInfo[playerid][pPin], true)) { PlayerInfo[playerid][pUnlocked] = 1; SCM(playerid, COLOR_LIGHTBLUE, "Contul tau a fost deblocat cu succes!"); } else { SCM(playerid, COLOR_LIGHTRED, "Ai introdus un PIN gresit!"); } return 1; } CMD:changepin(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); new pin[128],pin2[128], string[128]; if(strlen(PlayerInfo[playerid][pPin]) == 0) return SCM(playerid, COLOR_LIGHTRED, "You don't have a pin code. Type [/addpin] to add one."); if(sscanf(params, "s[128]s[128]", pin, pin2)) return SCM(playerid, COLOR_SYN, "Syntax: /changepin [/size][/font][/color][/background]<4-digit-new-pin>"); if(!IsNumeric(pin)) return SCM(playerid, COLOR_SYN, "Syntax: /changepin <4-digit-new-pin>"); if(strlen(pin) != 4) return SCM(playerid, COLOR_SYN, "Syntax: /changepin <4-digit-new-pin>"); if(!IsNumeric(pin2)) return SCM(playerid, COLOR_SYN, "Syntax: /changepin <4-digit-new-pin>"); if(strlen(pin2) != 4) return SCM(playerid, COLOR_SYN, "Syntax: /changepin <4-digit-new-pin>"); if(strcmp(pin, PlayerInfo[playerid][pPin], true)) return SCM(playerid, COLOR_LIGHTRED, "You entered a wrong pin."); string[0] = (EOS); mysql_format(SQL, string, sizeof(string), "UPDATE `users` SET `Pin`='%s' WHERE `id`='%d'", pin2, PlayerInfo[playerid][pSQLID]); mysql_query(SQL, string); format(PlayerInfo[playerid][pPin], 5, "%s", pin2); format(string, sizeof(string), "Your new security pin code is %s. Don't forget it!", pin2); SCM(playerid, COLOR_LIGHTBLUE, string); return 1; } CMD:addpin(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");// Verificam daca este logat pe server. new pin[128], string[128]; if(strlen(PlayerInfo[playerid][pPin]) > 0) return SCM(playerid, COLOR_LIGHTRED, "You already have a pin code."); if(sscanf(params, "s[128]", pin)) return SCM(playerid, COLOR_SYN, "Syntax: /addpin <4-digit-code>"); if(!IsNumeric(pin)) return SCM(playerid, COLOR_SYN, "Syntax: /addpin <4-digit-code>"); if(strlen(pin) != 4) return SCM(playerid, COLOR_SYN, "Syntax: /addpin <4-digit-code>"); string[0] = (EOS); mysql_format(SQL, string, sizeof(string), "UPDATE `users` SET `Pin`='%s' WHERE `id`='%d'", pin, PlayerInfo[playerid][pSQLID]); mysql_query(SQL, string); format(PlayerInfo[playerid][pPin], 5, "%s", pin); format(string, sizeof(string), "Your new security pin code is %s. Don't forget it!", pin); SCM(playerid, COLOR_LIGHTBLUE, string); return 1; } 5. Mergem iar la OnPlayerConnect si mai adaugam si: strdel(PlayerInfo[playerid][pPin], 5, ""); 6. Acum mergem in baza de date la tabelul unde se salveaza conturile si urmati pasii din imagine: a. In tabelul unde se salveaza conturile; b. Apasam pe structure; c. Mergem jos la add column(s) si dam pe go https://i.imgur.com/iDskTiz.png (lasam1 in aceea castea) d. complectati coloanele la fel ca in imagine https://i.imgur.com/pMGKHtV.png si dupa apas pe Save
×
×
  • Create New...