Callback problem - 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: Callback problem (
/showthread.php?tid=323434)
Callback problem -
N0FeaR - 05.03.2012
I have make so you fall under 50hp but nothing happends when you get under 50hp thanks in advance.
callback
pawn Код:
}
public DoDeath(playerid)
{
new Float:phealth;
GetPlayerHealth(playerid,phealth);
if(phealth < 50)
SendClientMessage(playerid, COLOR_LIGHTRED, "You were brutally wounded, you can either wait for help or accept your death (/acceptdeath)");
Wounded[playerid] = 1;
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pDeath] = 0;
SetPlayerPos(playerid, DeathDest[playerid][0],DeathDest[playerid][1],DeathDest[playerid][2]);
SetPlayerVirtualWorld(playerid,DeathWorld[playerid]);
SetPlayerHealth(playerid, 5);
SetPlayerInterior(playerid,GetPlayerInterior(playerid));
ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 1);
return 1;
}
Re: Callback problem -
Twisted_Insane - 05.03.2012
So what should happen when somebody's health is under 50? I mean, you just told the script to send the player a message if his health is under 50, and now?
Also, you sure you scripted an "acceptdeath"-command?
Re: Callback problem -
N0FeaR - 05.03.2012
Yes i have script that, but just working when you got 0 hp
this will happend when you have under 50 hp ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 1); but not working.
Re: Callback problem -
N0FeaR - 05.03.2012
anyone?
Re: Callback problem -
[BP]Tony - 05.03.2012
pawn Код:
Add this one
}
public DoDeath(playerid)
{
new Float:phealth;
GetPlayerHealth(playerid,50);
if(phealth < 50)
SendClientMessage(playerid, COLOR_LIGHTRED, "You were brutally wounded, you can either wait for help or accept your death (/acceptdeath)");
Wounded[playerid] = 1;
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pDeath] = 0;
SetPlayerPos(playerid, DeathDest[playerid][0],DeathDest[playerid][1],DeathDest[playerid][2]);
SetPlayerVirtualWorld(playerid,DeathWorld[playerid]);
SetPlayerHealth(playerid, 5);
SetPlayerInterior(playerid,GetPlayerInterior(playerid));
ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 1);
return 1;
}
Re: Callback problem -
ThaFuq?Santinosback! - 05.03.2012
Pratar du svenska huh?
Re: Callback problem -
[BP]Tony - 05.03.2012
English Please!?
Re: Callback problem -
N0FeaR - 05.03.2012
Quote:
Originally Posted by ThaFuq?Santinosback!
Pratar du svenska huh?
|
Speak english here, send an pm if you want talk swedish.
Re: Callback problem -
N0FeaR - 05.03.2012
I get this now error 035: argument type mismatch (argument 2)
and the line is this GetPlayerHealth(playerid,50);
Re: Callback problem -
N0FeaR - 05.03.2012
Anyone?