05.08.2010, 06:54
[QUOTE=Carlton;778990]
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...
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...