Disarm players on login
#9

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Wrote a couple of functions for you, the names should be enough to tell you what they do.
pawn Код:
enum WEP_DAT
{
    e_iWeapons[13],
    e_iAmmo[13],
};

new gPlayerWeaponData[MAX_PLAYERS][WEP_DAT];

RemoveWeapons(playerid)
{
    for(new i; i < 13; i++)
        GetPlayerWeaponData(playerid, i, gPlayerWeaponData[playerid][e_iWeapons][i], gPlayerWeaponData[playerid][e_iAmmo][i]);

    ResetPlayerWeapons(playerid);//this function disarms players
}

GiveBackWeapons(playerid)
{
    for(new i; i < 13; i++)
        GivePlayerWeapon(playerid, gPlayerWeaponData[playerid][e_iWeapons][i], gPlayerWeaponData[playerid][e_iAmmo][i]);
}
First, add that to your script.
Second, look at your code

pawn Код:
// Deathmatch Command
ResetWeapons( playerid );

// GivePlayerWeapon, blablablabla
pawn Код:
// Leave Deathmatch Command
ResetPlayerWeapons( playerid );
GiveBackWeapons( playerid );
Reply


Messages In This Thread
Disarm players on login - by ColdIce - 08.07.2011, 16:30
Re: Disarm players on login - by iggy1 - 08.07.2011, 16:42
Re: Disarm players on login - by ColdIce - 08.07.2011, 16:52
Re: Disarm players on login - by ColdIce - 08.07.2011, 22:51
Re: Disarm players on login - by PrawkC - 08.07.2011, 22:57
Re: Disarm players on login - by ColdIce - 08.07.2011, 23:11
Re: Disarm players on login - by ColdIce - 09.07.2011, 17:31
Re: Disarm players on login - by ColdIce - 10.07.2011, 23:01
Re: Disarm players on login - by Basicz - 10.07.2011, 23:06
Re: Disarm players on login - by ColdIce - 11.07.2011, 09:09

Forum Jump:


Users browsing this thread: 2 Guest(s)