27.11.2010, 21:35
(
Последний раз редактировалось Auxxx; 27.11.2010 в 21:49.
)
I'm not sure, that this is what you mean, but It's working, I tested it out...
At the top of your script:
and then somewhere there, put:
At the top of your script:
pawn Код:
new Float: deathx, Float:deathy, Float:deathz;
pawn Код:
public OnPlayerDeath(playerid)
{
GetPlayerPos(playerid, deathx, deathy, deathz);
SetPVarInt(playerid, "Death", 1);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/acceptdeath", cmdtext, true, 10) == 0)
{
if(GetPVarInt(playerid, "Death") == 0) return SendClientMessage(playerid, 0xFF4646FF, "You are not dead.");
GivePlayerMoney(playerid, -500);
SetPVarInt(playerid, "Death", 0);
SetPlayerPos(playerid, deathx, deathy, deathz);
}
return 1;
}