Spawn Weapons Help
#1

Hello, I need help with Spawn Weapons

For example: When a player is on the server he wants to buy spawn weapons that when he dies he get the weapons back

I dont have any idea of how doin this

Thanks for Ideas
Reply
#2

Save the weapons and ammo into variables.
Reply
#3

he mean
you must check what weapons he have if he go die
and then if he spawn load the weapons
Reply
#4

may u guys gimme a code that may help me?

I am not understanding..

thanks
Reply
#5

pawn Код:
//Over main (under includes)
new
    weapon[MAX_PLAYERS],
    ammo[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    weapon[playerid] = GetPlayerWeapon(playerid),
    ammo[playerid] = GetPlayerAmmo(playerid);
    return true;
}

public OnPlayerSpawn(playerid)
{
    GivePlayerWeapon(playerid, weapon[playerid], ammo[playerid]);
    return true;
}
Reply
#6

Only saves one weapon for me.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)