Drop Pickup With Weapons On Player Death
#1

Hey Guys

Now i wanted to make something to drop the players weapons who died.
so another could pick em up and they are away...

my code is like this:

pawn Код:
#define PLAYER_WEAPONS 1
new gPlayerWeapons[2][2];
// ---------
public OnPlayerDeath(playerid, killerid, reason)
{
    new WeaponPickup;
    new Float:PlayerPosX;
    new Float:PlayerPosY;
    new Float:PlayerPosZ;
   
    GetPlayerPos(playerid, PlayerPosX, PlayerPosY,PlayerPosZ);
    gPlayerWeapons[][] = GetPlayerWeapon(playerid);
    WeaponPickup = CreatePickup(1240, 3, PlayerPosX, PlayerPosY, PlayerPosZ);
    return 1;
}
// --------
public OnPlayerPickupPickup(playerid, pickupid)
{
    if (pickupid == PLAYER_WEAPONS)
    {
        for (new i=0; i<=2; i++)
        {
            GivePlayerWeapon(playerid, gPlayerWeapons[i][], gPlayerWeapons[][i]);
        }
    }
    return 1;
}

I know its not very nice scripted, but i really dont know how to get it.
Reply
#2

are you getting a error ?
Reply
#3

2 errors and a warning

Quote:

C:\Users\Jonni\Desktop\SA-MP Server\gamemodes\TheKillerzBeta.pwn(529) : error 029: invalid expression, assumed zero
C:\Users\Jonni\Desktop\SA-MP Server\gamemodes\TheKillerzBeta.pwn(530) : warning 204: symbol is assigned a value that is never used: "WeaponPickup"
C:\Users\Jonni\Desktop\SA-MP Server\gamemodes\TheKillerzBeta.pwn(727) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickupPickup")
C:\Users\Jonni\Desktop\SA-MP Server\gamemodes\TheKillerzBeta.pwn(733) : error 029: invalid expression, assumed zero

But i guess my script is completely wrong...
isnt it?
Reply
#4

BUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)