Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( cmd == "buywep" )
- {
- if ( status[ player.ID ].Registered == false ) ErrorMessage( "[#FFFFFF]You need to be a part of our community to use this command.", player );
- else if ( status[ player.ID ].Logged == false ) ErrorMessage( "[#FFFFFF]You need to be identified to use this command.", player );
- else if (!text) ErrorMessage( "/"+cmd+" <Wep Name> Note: You can buy those weapons which are disallowed in /wep.", player );
- else
- {
- local Pos = player.Pos, checkpoly; checkpoly = InPoly( Pos.x, Pos.y, -682.759, 1201.86,-682.76, 1208.14,-666.617, 1209.52,-666.617, 1202.46);
- if( checkpoly == false ) ErrorMessage("You need to be at the ammunation shop in Downtown to buy weapons!", player );
- else
- {
- local wep = GetWeaponID(text), money = 0, ammo = 0;
- switch( wep )
- {
- case 30:
- money = 2000;
- ammo = 80;
- break;
- case 100:
- money = 2000;
- ammo = 200;
- break;
- case 101:
- money = 1000;
- ammo = 300;
- break;
- case 102:
- money = 1000;
- ammo = 530;
- break;
- case 103:
- money = 200;
- ammo = 500;
- break;
- case 104:
- money = 250;
- ammo = 999;
- break;
- case 105:
- money = 300;
- ammo = 103;
- break;
- case 33:
- money = 2500;
- ammo = 1000;
- break;
- case 15:
- money = 500;
- ammo = 100;
- break;
- case 11:
- money = 100;
- ammo = 1;
- break;
- case 12:
- money = 500;
- ammo = 100;
- break;
- case 13:
- money = 500;
- ammo = 99;
- break;
- case 14:
- money = 500;
- ammo = 100;
- break;
- case 31:
- money = 1500;
- ammo = 1500;
- break;
- case 28:
- money = 120;
- ammo = 50;
- break;
- case 29:
- money = 200;
- ammo = 100;
- break;
- default:
- ErrorMessage( "Sorry the weapon ("+ GetWepName(wep)+") you typed is incorrect or not in buy list use /wep for free weps.", player );
- }
- if ( status[ player.ID ].VIPLevel > 0 )
- {
- switch( wep )
- {
- case 30:
- money = 1000;
- ammo = 100;
- break;
- case 100:
- money = 1500;
- ammo = 200;
- break;
- case 101:
- money = 800;
- ammo = 300;
- break;
- case 102:
- money = 1000;
- ammo = 999;
- break;
- case 103:
- money = 200;
- ammo = 503;
- break;
- case 104:
- money = 200;
- ammo = 999;
- break;
- case 105:
- money = 250;
- ammo = 103;
- break;
- case 33:
- money = 2000;
- ammo = 1000;
- break;
- case 15:
- money = 1000;
- ammo = 100;
- break;
- case 11:
- money = 100;
- ammo = 1;
- break;
- case 12:
- money = 300;
- ammo = 100;
- break;
- case 13:
- money = 500;
- ammo = 100;
- break;
- case 14:
- money = 500;
- ammo = 100;
- break;
- case 31:
- money = 1000;
- ammo = 1500;
- break;
- case 28:
- money = 120;
- ammo = 60;
- break;
- case 29:
- money = 200;
- ammo = 107;
- break;
- default:
- }
- }
- if ( money != 0 && ammo != 0 )
- {
- if ( player.Cash >= money )
- {
- player.GiveWeapon(wep, ammo);
- player.Cash-=money;
- SendMessage( "[#0099ff]You have bought: "+GetWepName(wep)+", Cost: $"+money+", Ammos: "+ammo+".", player );
- }
- else ErrorMessage("You must have $" + money + " to buy "+GetWepName(wep)+", with ammos: " + ammo + ".", player );
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment