SA-MP Forums Archive
Little help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little help (/showthread.php?tid=547596)



Little help - LeXuZ - 23.11.2014

I've been making death match minigame, i've got most of it working, but i am having problems with the deaths on it, i wanted it so when you die you spawn back in the deathmatch area with the death match weapon, but i've only got it to spawn back in the area, but doesn't give me the weapon...

Код:
public OnPlayerSpawn(playerid)
{
 	if(DMDeath[playerid] == 1)
	{
	    if(GetPlayerState(playerid) == PLAYER_STATE_WASTED)
	    {
	    	SetPlayerPos(playerid, 2798.9478,-1467.2285,28.1563);
			GivePlayerWeapon(playerid, 24, 99999);
		}
	}
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	if(DMM[playerid] == 1)
	{
 		DMDeath[playerid] = 1;
	}
	return 1;
}
If you could help me that would be great!
I have tried multiple ways of it and could only get to spawn.


Re: Little help - HY - 23.11.2014

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(DMDeath[playerid] == 1)
    {
        SetPlayerPos(playerid, 2798.9478,-1467.2285,28.1563);
        GivePlayerWeapon(playerid, 24, 99999);
    }      
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(DMM[playerid] == 1)
    {
        DMDeath[playerid] = 1;
    }
    return 1;
}



Re: Little help - LeXuZ - 23.11.2014

Thank you for replying, i will go test this now.