05.02.2013, 17:10
(
Последний раз редактировалось hustrine; 06.02.2013 в 11:46.
)
Hello guys!
I created gun shop filterscript!
I know he is easy, but that start for great gun shop script!
http://www.youtube.com/watch?v=YHxhV...ature=*********
Script
Download: Eng version: http://adf.ly/IcX5E
P.S. Sorry for my bad english... ;(
I created gun shop filterscript!
I know he is easy, but that start for great gun shop script!
http://www.youtube.com/watch?v=YHxhV...ature=*********
Script
Код:
// gun shop filterscript by - hustrine // started at 2013.02.05 // version 0.1 // idea and scripter - hustrine #include < a_samp > //Variables new Enter, Exit, Ak47, M4, Colt45, Silent, Armour ; public OnFilterScriptInit() { //option's DisableInteriorEnterExits(); //disable default San Andreas entrance and exit //pickup's Enter = CreatePickup( 1318, 2, -2052.0664,404.1140,35.2535 ); //shop entrance pickup Exit = CreatePickup( 1318, 2, 286.148986,-40.644397,1001.515625 ); //shop exit pickup Ak47 = CreatePickup( 355, 1, 290.6869,-34.5512,1001.5156 ); //Ak47 pickup M4 = CreatePickup( 356, 1, 288.9970,-34.8793,1001.5156 ); //M4 pickup Colt45 = CreatePickup( 346, 1, 295.5028,-34.7931,1001.5156 ); //Colt 45 pickup Silent = CreatePickup( 347, 1, 293.8184,-34.5911,1001.5156 ); //Silent pickupt Armour = CreatePickup( 1242, 1, 297.0397,-38.5147,1001.5156 ); //Armour Pickup //object's CreateObject(8947,-2052.8999023,407.6000061,31.2000008,0.0000000,0.0000000,0.0000000); //object(vgelkup) (6) CreateObject(8947,-2038.1999512,407.6000061,31.2000008,0.0000000,0.0000000,0.0000000); //object(vgelkup) (7) CreateObject(8947,-2023.5000000,407.6000061,31.2000008,0.0000000,0.0000000,0.0000000); //object(vgelkup) (8) CreateObject(8947,-2023.5000000,432.0000000,31.2000008,0.0000000,0.0000000,0.0000000); //object(vgelkup) (9) CreateObject(8947,-2038.0999756,432.1000061,31.2000008,0.0000000,0.0000000,0.0000000); //object(vgelkup) (10) CreateObject(16774,-2067.1999512,424.7000122,35.7999992,0.0000000,0.0000000,90.0000000); //object(des_gunbldg) (1) CreateObject(2064,-2051.1999512,405.8999939,34.9000015,0.0000000,0.0000000,64.0000000); //object(cj_feildgun) (1) CreateObject(2064,-2051.3000488,402.6000061,34.9000015,0.0000000,0.0000000,115.9953613); //object(cj_feildgun) (2) CreateObject(970,-2050.3000488,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (1) CreateObject(970,-2046.1999512,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (2) CreateObject(970,-2042.0999756,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (3) CreateObject(970,-2038.0000000,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (4) CreateObject(970,-2033.9000244,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (5) CreateObject(970,-2029.8000488,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (6) CreateObject(970,-2025.6999512,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (7) CreateObject(970,-2021.5999756,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (8) CreateObject(970,-2018.3000488,395.3999939,34.7999992,0.0000000,0.0000000,0.0000000); //object(fencesmallb) (9) CreateObject(970,-2016.1999512,397.5000000,34.7999992,0.0000000,0.0000000,90.0000000); //object(fencesmallb) (10) CreateObject(970,-2016.1999512,401.6000061,34.7999992,0.0000000,0.0000000,90.0000000); //object(fencesmallb) (11) CreateObject(970,-2016.1999512,405.7000122,34.7999992,0.0000000,0.0000000,90.0000000); //object(fencesmallb) (12) CreateObject(970,-2016.3000488,416.8999939,34.7999992,0.0000000,0.0000000,90.0000000); //object(fencesmallb) (13) CreateObject(970,-2016.3000488,421.0000000,34.7999992,0.0000000,0.0000000,90.0000000); //object(fencesmallb) (14) CreateObject(970,-2016.3000488,425.1000061,34.7999992,0.0000000,0.0000000,90.0000000); //object(fencesmallb) (15) CreateObject(970,-2016.3000488,429.2000122,34.7999992,0.0000000,0.0000000,90.0000000); //object(fencesmallb) (16) CreateObject(970,-2016.8000488,433.2999878,34.7999992,0.0000000,0.0000000,104.0000000); //object(fencesmallb) (17) CreateObject(792,-2016.8000488,396.0000000,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (1) CreateObject(792,-2027.8000488,396.0000000,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (2) CreateObject(792,-2040.0999756,396.1000061,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (3) CreateObject(792,-2051.8000488,396.0000000,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (4) CreateObject(792,-2016.8000488,407.1000061,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (5) CreateObject(792,-2016.9000244,415.5000000,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (6) CreateObject(792,-2016.8000488,427.1000061,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (7) CreateObject(792,-2017.4000244,433.6000061,34.2999992,0.0000000,0.0000000,0.0000000); //object(aw_streettree1) (8) CreateObject(994,-2037.8000488,415.5000000,34.2999992,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (1) CreateObject(994,-2037.9000244,421.1000061,34.2999992,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (2) CreateObject(994,-2037.9000244,426.2000122,34.2999992,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (3) CreateObject(994,-2037.9000244,431.6000061,34.2999992,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (4) CreateObject(1597,-2017.4000244,401.5000000,36.9000015,0.0000000,0.0000000,0.0000000); //object(cntrlrsac1) (1) CreateObject(1597,-2017.5999756,421.5000000,36.9000015,0.0000000,0.0000000,0.0000000); //object(cntrlrsac1) (2) CreateObject(1597,-2022.4000244,396.1000061,36.9000015,0.0000000,0.0000000,90.2500000); //object(cntrlrsac1) (3) CreateObject(1597,-2034.0999756,396.0000000,36.9000015,0.0000000,0.0000000,90.2471924); //object(cntrlrsac1) (4) CreateObject(1597,-2046.1999512,396.3999939,36.9000015,0.0000000,6.0000000,90.2471924); //object(cntrlrsac1) (5) CreateObject(1597,-2045.6999512,414.2000122,36.9000015,0.0000000,9.9985352,90.2471924); //object(cntrlrsac1) (6) ///nustatymai print("\n--------------------------------------"); print(" hGun v0.1 started"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { print("\n--------------------------------------"); print(" hGun v0.1 stoped"); print("--------------------------------------\n"); return 1; } public OnPlayerConnect( playerid ) { GivePlayerMoney( playerid, 5000 ); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if( pickupid == Enter ) //shop entrance pickup { SetPlayerInterior( playerid, 1 ); SetPlayerPos( playerid, 285.6241,-37.7914,1001.5156 ); return 1; } if( pickupid == Exit ) //shop exit pickup { SetPlayerInterior( playerid, 0 ); SetPlayerPos( playerid, -2048.8091,404.3385,35.2535 ); return 1; } if( pickupid == Ak47 ) //AK47 pickup { GameTextForPlayer( playerid, "~g~Model - ~r~AK 47~n~~g~Bullet - ~r~100~n~~g~Cost - ~r~250~n~~g~To buy it press ~r~ENTER", 5000, 0 ); return 1; } if( pickupid == M4 ) //M4 pickup { GameTextForPlayer( playerid, "~g~Model - ~r~M4~n~~g~Bullet - ~r~100~n~~g~Cost - ~r~350~n~~g~To buy it press ~r~ENTER", 5000, 0 ); return 1; } if( pickupid == Colt45 ) { GameTextForPlayer( playerid, "~g~Model - ~r~Colt 45~n~~g~Bullet - ~r~100~n~~g~Cost - ~r~160~n~~g~To buy it press ~r~ENTER", 5000, 0 ); return 1; } if( pickupid == Silent ) { GameTextForPlayer( playerid, "~g~Model - ~r~Silent Colt 45~n~~g~Bullet - ~r~100~n~~g~Cost - ~r~260~n~~g~To buy it press ~r~ENTER", 5000, 0 ); return 1; } if( pickupid == Armour ) { GameTextForPlayer( playerid, "~g~Model - ~r~Armour~n~~n~~g~Cost - ~r~500~g~To buy it press ~r~ENTER", 5000, 0 ); return 1; } return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if( newkeys == KEY_SECONDARY_ATTACK ) { if( IsPlayerInRangeOfPoint( playerid, 0.5, 290.6869,-34.5512,1001.5156 )) { if( GetPlayerMoney( playerid ) < 250 ) { SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}You not have money for this gun!" ); return 1; } else { GivePlayerWeapon( playerid, 30, 100 ); GivePlayerMoney( playerid, -250 ); SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}Thanks for purshase!" ); return 1; } } if( IsPlayerInRangeOfPoint( playerid, 0.5, 288.9970,-34.8793,1001.5156 )) { if( GetPlayerMoney( playerid ) < 350 ) { SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}You not have money for this gun!" ); return 1; } else { GivePlayerWeapon( playerid, 31, 100 ); GivePlayerMoney( playerid, -350 ); SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}Thanks for purshase!" ); return 1; } } if( IsPlayerInRangeOfPoint( playerid, 0.5, 295.5028,-34.7931,1001.5156 )) { if( GetPlayerMoney( playerid ) < 160 ) { SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}You not have money for this gun!" ); return 1; } else { GivePlayerWeapon( playerid, 22, 100 ); GivePlayerMoney( playerid, -160 ); SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}Thanks for purshase!" ); return 1; } } if( IsPlayerInRangeOfPoint( playerid, 0.5, 293.8184,-34.5911,1001.5156 )) { if( GetPlayerMoney( playerid ) < 260 ) { SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}You not have money for this gun!" ); return 1; } else { GivePlayerWeapon( playerid, 23, 100 ); GivePlayerMoney( playerid, -260 ); SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}Thanks for purshase!" ); return 1; } } if( IsPlayerInRangeOfPoint( playerid, 0.5, 297.0397,-38.5147,1001.5156 )) { if( GetPlayerMoney( playerid ) < 500 ) { SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}You not have money for this gun!" ); return 1; } else { SetPlayerArmour( playerid, 100.0 ); GivePlayerMoney( playerid, -500 ); SendClientMessage( playerid, -1, "{FFE600}[ hGun ]: {FFFFFF}Thanks for purshase!" ); return 1; } } } return 1; }
P.S. Sorry for my bad english... ;(