if (pPlayer->m_AccData.m_UserID && !pPlayer->m_AccData.m_Vip)
{
if (pPlayer->m_AccData.m_UserID && haveWeapons == true)
{
SendChatTarget(ClientID, "you already have all weapons");
}
if (pPlayer->m_AccData.m_Weaponkits >= 1 && !haveWeapons)
{
pPlayer->m_AccData.m_Weaponkits--;
char aRemaining[64];
str_format(aRemaining, sizeof(aRemaining), "Remaining kits: %d", pPlayer->m_AccData.m_Weaponkits);
SendChatTarget(ClientID, aRemaining);
pChar->GiveAllWeapons();
haveWeapons = true;
}
else if (pPlayer->m_AccData.m_Weaponkits = 0 && !haveWeapons)
{
SendChatTarget(ClientID, "You dont have any weaponkit!");
}
}
problem = when im entering the command for the first time that give the weapons (normal) but for the second time the haveweapons should be in true
but that continue to give me the weapons! maybe a problem of syntax if (pPlayer->m_AccData.m_UserID && !pPlayer->m_AccData.m_Vip)
{
if (pPlayer->m_AccData.m_UserID && haveWeapons == true)
{
SendChatTarget(ClientID, "you already have all weapons");
}
if (pPlayer->m_AccData.m_Weaponkits >= 1 && !haveWeapons)
{
pPlayer->m_AccData.m_Weaponkits--;
char aRemaining[64];
str_format(aRemaining, sizeof(aRemaining), "Remaining kits: %d", pPlayer->m_AccData.m_Weaponkits);
SendChatTarget(ClientID, aRemaining);
pChar->GiveAllWeapons();
haveWeapons = true;
}
else if (pPlayer->m_AccData.m_Weaponkits = 0 && !haveWeapons)
{
SendChatTarget(ClientID, "You dont have any weaponkit!");
}
}
problem = when im entering the command for the first time that give the weapons (normal) but for the second time the haveweapons should be in true
but that continue to give me the weapons! maybe a problem of syntax struct WeaponStat
{
int m_AmmoRegenStart;
int m_Ammo;
int m_Ammocost;
bool m_Got;
} m_aWeapons[NUM_WEAPONS];
if (pPlayer->m_AccData.m_UserID && !pPlayer->m_AccData.m_Vip)
{
if (pPlayer->m_AccData.m_UserID && haveWeapons == true)
{
SendChatTarget(ClientID, "you already have all weapons");
}
if (pPlayer->m_AccData.m_Weaponkits >= 1 && !haveWeapons)
{
pPlayer->m_AccData.m_Weaponkits--;
char aRemaining[64];
str_format(aRemaining, sizeof(aRemaining), "Remaining kits: %d", pPlayer->m_AccData.m_Weaponkits);
SendChatTarget(ClientID, aRemaining);
pChar->GiveAllWeapons();
haveWeapons = true;
}
else if (pPlayer->m_AccData.m_Weaponkits = 0 && !haveWeapons)
{
SendChatTarget(ClientID, "You dont have any weaponkit!");
}
}
problem = when im entering the command for the first time that give the weapons (normal) but for the second time the haveweapons should be in true
but that continue to give me the weapons! maybe a problem of syntax