case 2:
{
if(GetPlayerWeapon(playerid) == 0)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have any weapons to add to your Briefcase.");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned to use your Briefcase.");
return 1;
}
SendClientMessage(playerid,COLOR_GREEN,"You have added a weapon into your Briefcase.");
new wname[24];
HasPackWeapon[playerid] +=GetPlayerWeapon(playerid);
GetWeaponName(GetPlayerWeapon(playerid),wname,sizeof(wname));
ResetPlayerWeapons(playerid,GetPlayerWeapon(playerid));
return 1;
}
case 5:
{
if(HasPackWeapon[playerid] == 0)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have weapons to remove from your Briefcase.");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned to use your Briefcase.");
return 1;
}
SendClientMessage(playerid,COLOR_GREEN,"You have taken a weapon from your Briefcase.");
GivePlayerWeapon(playerid,HasPackWeapon[playerid]);
HasPackWeapon[playerid] -=GetPlayerWeapon(playerid);
return 1;
}
case 0:
{
if(GetPlayerMoney(playerid) <= 0)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have any Money to add to your Briefcase.");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned to use your Briefcase.");
return 1;
}
new total =HasPackMoney[playerid] + GetPlayerMoney(playerid);
if(total > 2000000)
{
SendClientMessage(playerid,COLOR_ERROR,"Your Briefcase cannot hold more than $2 Million. Put some in the bank.");
return 1;
}
SendClientMessage(playerid, COLOR_GREEN, "You have put all your money inside the Briefcase.");
HasPackMoney[playerid] +=GetPlayerMoney(playerid);
GivePlayerMoney(playerid,-GetPlayerMoney(playerid));
return 1;
}
case 3:
{
if(HasPackMoney[playerid] == 0)
{
SendClientMessage(playerid,COLOR_ERROR,"You do not have any Money in your Briefcase.");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned to use your Briefcase.");
return 1;
}
new total =HasPackMoney[playerid] + GetPlayerMoney(playerid);
if(total > 250000)
{
SendClientMessage(playerid,COLOR_ERROR,"You must put some money in your bank before getting out of your Briefcase.");
}
else
{
GivePlayerMoney(playerid,HasPackMoney[playerid]);
HasPackMoney[playerid] -=GetPlayerMoney(playerid);
}
return 1;
}
HasPackWeapon[playerid] +=GetPlayerWeapon(playerid);
What I am saying is, when I press Put Weapon in, it will take the weapon i have in my hand and place it into the briefcase. What happens is when I try that it takes all of my weapons away instead of the one that I have in my hand.
|