weapons are not readable

Started by MEGAMIND, Jul 15, 2018, 12:18 PM

Previous topic - Next topic

MEGAMIND

i just made the poly the rest of it is XMAIRS wep system probably idk

so what the problem, its not reading some of the weps name

else if ( cmd == "wep" )
 {
 if (!text) MessagePlayer("/wep <Wep Name>", player);
 else
 {
 local Pos = player.Pos, checkpoly;
 checkpoly = InPoly( Pos.x, Pos.y, -682.612488, 1201.854736,  -682.759827, 1208.136597, -666.613953, 1211.414185,  -666.614258, 1202.456909);
 local wep = GetWeaponName(GetWeaponID(text));
 if( checkpoly == false ) MessagePlayer("You need to be at the ammunation shop in Downtown to buy weapons!", player);
 else if (wep == "M60")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(32,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep == "M4")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(26,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if ((wep == "Ruger")||(wep == "ruger"))
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(27,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep == "MP5")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(25,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if ((wep == "UZI")||(wep == "uzi"))
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(23,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else MessagePlayer("Sorry we don't have that type of model of the weapon "+text+" here.", player);
 }
 }

so i have checked it so far its not reading the wep uzi i also added a wep flamethrower but didnt read the too


any help would be appreciable

Xmair

I don't have any system like that. It's scripted too badly.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

NicusorN5

else if ( cmd == "wep" )
 {
 if (!text) MessagePlayer("/wep <Wep Name>", player);
 else
 {
 local Pos = player.Pos, checkpoly = InPoly( Pos.x, Pos.y, -682.612488, 1201.854736,  -682.759827, 1208.136597, -666.613953, 1211.414185,  -666.614258, 1202.456909);
 local wep = GetWeaponName(GetWeaponID(text));
 if( checkpoly == false ) MessagePlayer("You need to be at the ammunation shop in Downtown to buy weapons!", player);
 else if (wep == "M60")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(32,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep == "M4")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(26,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if ((wep == "Ruger")||(wep == "ruger"))
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(27,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep.tolower() == "mp5")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(25,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep.tolower() == "uzi")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(23,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else MessagePlayer("Sorry we don't have that type of model of the weapon "+text+" here.", player);
 }
 }
Tested on my server. This one works. PM me if it dosen't.

Quote from: Xmair on Jul 15, 2018, 03:24 PMI don't have any system like that. It's scripted too badly.
:/ I know. Took me few minutes to find out how to fix that.

MEGAMIND


MEGAMIND

Quote from: Athanatos on Jul 15, 2018, 03:29 PM else if ( cmd == "wep" )
 {
 if (!text) MessagePlayer("/wep <Wep Name>", player);
 else
 {
 local Pos = player.Pos, checkpoly = InPoly( Pos.x, Pos.y, -682.612488, 1201.854736,  -682.759827, 1208.136597, -666.613953, 1211.414185,  -666.614258, 1202.456909);
 local wep = GetWeaponName(GetWeaponID(text));
 if( checkpoly == false ) MessagePlayer("You need to be at the ammunation shop in Downtown to buy weapons!", player);
 else if (wep == "M60")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(32,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep == "M4")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(26,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if ((wep == "Ruger")||(wep == "ruger"))
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(27,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep.tolower() == "mp5")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(25,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else if (wep.tolower() == "uzi")
 {
 if ( player.Cash <= 49999) MessagePlayer("You need to have atleast 50000$!", player);
 player.SetWeapon(23,9999)
 player.Cash-=50000;
 MessagePlayer("Successfully Received An [#ffffff]"+wep+"", player);
 }
 else MessagePlayer("Sorry we don't have that type of model of the weapon "+text+" here.", player);
 }
 }
Tested on my server. This one works. PM me if it dosen't.

Quote from: Xmair on Jul 15, 2018, 03:24 PMI don't have any system like that. It's scripted too badly.
:/ I know. Took me few minutes to find out how to fix that.

NicusorN5


Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

MEGAMIND