[HELP] making /accept death CMD.
#1

Thank you.
Reply
#2

Код:
forward health(playerid);
public health(playerid)
{
if(GetPlayerHealth(playerid,health) <= 1)
{
new Float:health;
SetPlayerHealth(playerid,1.00);
TogglePlayerControllable(playerid,false);
GameTextForPlayer(playerid,"Type /accept to accept your Death");
}
}

public OnPlayerConnect(playerid,blablabla)
{
SetTimerEx("health",1000,true,"i",playerid);
}

pubic onplayercommandtext(playerid, blablabla)
{
if(strcmp("/accept",cmdtext,true) == 0)
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,0xAA3333AA,"You died because you accepted your death");
}
}
Reply
#3

Thanks....
Reply
#4

No problem if you have any problems you can Pm me
Reply
#5

early warning - it would not get all deaths.
Reply
#6

Quote:
Originally Posted by GTA967
early warning - it would not get all deaths.
Okay....
Reply
#7

Quote:
Originally Posted by Nakash
Quote:
Originally Posted by GTA967
early warning - it would not get all deaths.
What do you mean? can you fix the code please?
BUMP [12 hours has been moved]
Reply
#8

People don't wait a second before shots, do they..?

Best thing to do would be to have a custom spawning system using SetPlayerPos. When they die, do that /accept message, so when they type it they spawn.
Reply
#9

I need to modify it a bit,but thanks alot xD
Reply
#10

pawn Код:
forward health(playerid);
public health(playerid)
{
if(GetPlayerHealth(playerid,health) <= 1)
{
new Float:health;
SetPlayerHealth(playerid,1.00);
TogglePlayerControllable(playerid,false);
GameTextForPlayer(playerid,"Type /accept to accept your Death");
}
}

public OnPlayerConnect(playerid,blablabla)
{
SetTimerEx("health",1000,true,"i",playerid);
}

pubic onplayercommandtext(playerid, blablabla)
{
if(strcmp("/accept",cmdtext,true) == 0)
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,0xAA3333AA,"You died because you accepted your death");
SetPlayerPos(YOUR CO _ ORDS);
}
}
return 1;
Thats much better just place your co - ordanates
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)