Detect the model of pickup, or?
#3

Uh, I'm using an dropplayerweapons script, which basically drops player weapons as a pickup model of the weapon, and i want to DEFINE weaponid somehow so this should easily work:

pawn Код:
switch(weaponid)
    {
        case 0,1: slot = 0;
        case 2 .. 9: slot = 1;
        case 10 .. 15: slot = 10;
        case 16 .. 18, 39: slot = 8;
        case 22 .. 24: slot =2;
        case 25 .. 27: slot = 3;
        case 28, 29, 32: slot = 4;
        case 30, 31: slot = 5;
        case 33, 34: slot = 6;
        case 35 .. 38: slot = 7;
        case 40: slot = 12;
        case 41 .. 43: slot = 9;
        case 44 .. 46: slot = 11;
    }
    format(string,sizeof(string),"wslot%d",slot);
    SetPVarInt(playerid,string,weaponid);
I tried few options, but if doing this with like: stock Weapons(playerid) doesn't work, adding an extra: ,weaponid to the brackets should work but then i don't know what to write in the weaponid tab when i put the command in onpickuppickup.
Reply


Messages In This Thread
Detect the model of pickup, or? - by 0ne - 08.08.2010, 08:13
Re: Detect the model of pickup, or? - by Carlton - 08.08.2010, 08:23
Re: Detect the model of pickup, or? - by 0ne - 08.08.2010, 08:48

Forum Jump:


Users browsing this thread: 1 Guest(s)