How to shorten this up a bit?
#3

There are no bugs or such, I just need to cut it down. Its too big.


I just need to know how to instead of making

pawn Код:
new weaponreceiveddeagle
new weaponreceivedshotgun
new weaponreceivedminigun
I can just make
new weaponreceived = "shotgun" and then if they receive deagle it would actualy be weaponreceived = "deagle" (Set by me).


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

CMD:receiveshotgun(playerid, params[])
{
           weaponreceived = "shotgun";
           return 1;
}

CMD:what(playerid,params[])
{
            if(weaponreceived = "shotgun")
            {
                       //.................
            }
return 1;
}
Basicaly how to detect it

if I have weapon = "deagle";
how to detect it?

if(weapon == "deagle") bugs...
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)