[HELP]Weapons after dead
#1

how to create weapons after player dead
like it

Reply
#2

http://forum.sa-mp.com/showthread.ph...=weapon+pickup
http://forum.sa-mp.com/showthread.ph...=weapon+pickup
Reply
#3

You can use OnPlayerDeath, along with CreateObject.

Example:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
       if(DoesPlayerHaveAnyGuns(playerid))
       {
            new Float: pos_x, Float: pos_y, Float: pos_z;
            new weapons[13][2];
            for (new i = 0; i <= 12; i++)
           {
                  GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
                  new weaponmodel = GetWeaponModelIDFromWeaponID(weapons[i]);
                  DroppedGuns[playerid][i] = CreateObject(weaponmodel, pos_x, pos_y, pos_z, 0.0, 0.0, 0.0);
           }
        }
        return 1;
}
That's just an example(don't expect it to work at all, as it has undefined functions, and isn't representative of an actual code - it's just an example for you to get how you can accomplish this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)