21.05.2014, 00:14
I want to do something like, If the health of the player = 0, Then set his pos to a position that i want
new Float:hp;
GetPlayerHealth(playerid, hp);
if(hp <= 0)
{
SetPlayerPos(playerid, X, Y, Z);
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid == killerid) return 0;
SetPlayerPos(playerid, -, -, -);
return 1;
}
Alright, I'm newbie. I made a place called /dm that gives health and armour.. etc, But if he dies, He has to go to /dm again, Which is annoying. So, I thought that if he gets 0 health, then he tp's back to that place
|
new Float:hp
GetPlayerHealth(playerid, hp);
if(hp <= 0)
{
// now because you want them to tp back to the /dm place:
SetPlayerPos(playerid, x,y,z);
SetPlayerHealth(playerid, 5); // change the 5 to what you want them to have when they are tped to that place.
}
but that will tp them to the place whenever he dies, I want if he joined the /dm
|