16.01.2014, 11:58
Quote:
Nгo coloca na public OnPlayerDeath que a onde esta a funзгo de dropar as armas.
|
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerWeapon(playerid) > 0)
{
new Float:pPosX, Float:pPosY, Float:pPosZ;
GetPlayerPos(playerid, pPosX, pPosY, pPosZ);
new r;
for(new i = 0; i != GetMaxPlayers()+100; i++)
{
if(DropGun[i][WeaponID] == 0)
{
r = i;
break;
}
}
DropGun[r][PickupID] = CreatePickup(GetWeaponModel(GetPlayerWeapon(playerid)), 19, pPosX, pPosY, pPosZ);
DropGun[r][WeaponID] = GetPlayerWeapon(playerid);
DropGun[r][Ammo] = minrand(100, 5000);
}