Disarm player after death.
#1

Hello, I am wondering how to disarm a player after they die, and then give them a chainsaw for a weapon. (Doesn't have to be a chainsaw, just an example.)
Reply
#2

Can you explain more good ?
Reply
#3

After the player dies, I want to remove their current weapons and give them a chainsaw. (Zombie gamemode)
Reply
#4

I'm sure you can do the rest
pawn Код:
new soldier[MAX_PLAYERS] = 1;
new zombie[MAX_PLAYERS] = 0;

OnPlayerSpawn(playerid)
{
if(soldier[playerid] == 1)
{
//code for weapons
}
else if(zombie[playerid] == 1)
{
//code for weapons
}

OnPlayerDeath(playerid,killerid,reason)
{
soldier[playerid] = 0;
zombie[playerid] = 1;
Reply
#5

I can't do the rest actually, I am a n00b scripter, I just have good ideas for my server.
Reply
#6

I don't need the player's team to change, I just need to change the weapons they have.
Reply
#7

Код:
new soldier[MAX_PLAYERS] = 1;
new zombie[MAX_PLAYERS] = 0;

OnPlayerSpawn(playerid)
{
if(soldier[playerid] == 1)
{
//code for weapons  //get the weapon ids and below is an example on how to give a player a weapon
}
else if(zombie[playerid] == 1)
{
SetPlayerSkin(playerid,skinid); //replace the skinid with a zombie id of your choice.
GivePlayerWeapon(playerid,9,1); //chainsaw
}

OnPlayerDeath(playerid,killerid,reason)
{
ResetPlayerWeapns(playerid);
soldier[playerid] = 0;
zombie[playerid] = 1;
return 1;
}
You can find the Weapon IDs' HERE
Reply
#8

I don't need the whole team system, I already have that part setup. I just need to give the player only a chainsaw after spawning.
Reply
#9

pawn Код:
// OnPlayerDeath
ResetPlayerWeapons(playerid);

// OnPlayerSpawn
GivePlayerWeapon(playerid,9,1);
Reply
#10

If I'm not mistaken, wouldn't that make all the characters start off with a chainsaw?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)