Parameters for a DM?
#4

[QUOTE=Carlton;778990]
pawn Code:
RemovePlayerWeapon(playerid, weaponid)
{
    if(!IsPlayerConnected(playerid) || weaponid < 0 || weaponid > 50)
        return;

    new
        saveweapon[13],
        saveammo[13];

    // Probably could be done using one loop
    for(new slot = 0; slot < 13; slot++)
        GetPlayerWeaponData(playerid, slot, saveweapon[slot], saveammo[slot]);

    ResetPlayerWeapons(playerid);

    for(new slot; slot < 13; slot++)
    {
        if(saveweapon[slot] == weaponid || saveammo[slot] == 0)
            continue;

        GivePlayerWeapon(playerid, saveweapon[slot], saveammo[slot]);
    }

    // give them weapon ID 0 to reset the current armed weapon
    // to a fist and not the last weapon in their inventory
    GivePlayerWeapon(playerid, 0, 1);

}


Thank you! so where should i put the coding? (the first one is the one i must use right?) also, i have several different DM's. like /m4dm so when a player tp's away from /m4dm (lets just say to /lsair) i just paste the above coding in the TP command? im sorry i dont understand...
Reply


Messages In This Thread
Parameters for a DM? - by Kevin_Joshen - 05.08.2010, 06:42
Re: Parameters for a DM? - by [MWR]Blood - 05.08.2010, 06:50
Re: Parameters for a DM? - by Carlton - 05.08.2010, 06:51
Re: Parameters for a DM? - by Kevin_Joshen - 05.08.2010, 06:54
Re: Parameters for a DM? - by Hiddos - 05.08.2010, 07:14
Re: Parameters for a DM? - by Carlton - 05.08.2010, 07:16
Re: Parameters for a DM? - by Kevin_Joshen - 05.08.2010, 07:22
Re: Parameters for a DM? - by Hiddos - 05.08.2010, 07:23
Re: Parameters for a DM? - by Kevin_Joshen - 05.08.2010, 07:27

Forum Jump:


Users browsing this thread: 1 Guest(s)