How to shorten this up a bit?
#1

pawn Код:
CMD:deagle(playerid, params[])
{
    WeaponReceivedDeagle = 1;
    return 1;
}


CMD:receivedweapon(playerid, params[])
{
    if(WeaponReceivedDeagle == 1)
    {
        GivePlayerWeapon(playerid, 24, 100);
    }
    else if(WeaponReceivedShotgun == 1)
    {
        GivePlayerWeapon(playerid, 25, 100);
    }
    return 1;
}

Is there any way to make it so it's like

new weaponreceived

if(weaponreceived = "deagle");
etc..

and ofc
pawn Код:
CMD:deagle(playerid, params[])
{
    Weaponreceived = "deagle";
    return 1;
}

I'm kinda newb
Reply


Messages In This Thread
How to shorten this up a bit? - by Pawnie - 18.10.2013, 18:48
Re: How to shorten this up a bit? - by daemon3304 - 18.10.2013, 18:58
Re: How to shorten this up a bit? - by Pawnie - 18.10.2013, 18:58
Re: How to shorten this up a bit? - by -Prodigy- - 18.10.2013, 19:17
AW: How to shorten this up a bit? - by Nero_3D - 18.10.2013, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)