PLz Help With ONPlayerDeath - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PLz Help With ONPlayerDeath (
/showthread.php?tid=129421)
PLz Help With ONPlayerDeath -
Keeboo13 - 22.02.2010
I want my player hospital to be like on szr gta when they dis i got this for MEdSpawn
Код:
new Float:gMedicSpawns[3][3] = {
{2500.2688,-1685.4584,13.4607},
{2500.2688,-1685.4584,13.4607},
{2500.2688,-1685.4584,13.4607}
};
ANd this for OnPlayerDeath
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new rand;
new string[256];
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
GivePlayerMoney(playerid, -cut);
format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 50);
SetPlayerInterior(playerid, 5);
rand = random(sizeof(gMedicSpawns));
SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // WarpThPl
SetPlayerFacingAngle(playerid, 270.0);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from your~r~wounds~y~...", 35000, 3);
MedicTime[playerid] = 1;
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 0, 0, 0, 0, 0); // Dieing of Crack
/*if(PlayerInfo[playerid][pDonateRank] > 0)
{
NeedMedicTime[playerid] = 30;
}
else*/
{
NeedMedicTime[playerid] = 60;
}
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
return 1;
}
Wgat do i need to add to make it like szr gta ...hospital...
Re: PLz Help With ONPlayerDeath -
dice7 - 22.02.2010
Set the pos on OnPlayerSpawn
Re: PLz Help With ONPlayerDeath -
Keeboo13 - 22.02.2010
wat u mean..
Re: PLz Help With ONPlayerDeath -
Keeboo13 - 22.02.2010
can anyone plz help
Re: PLz Help With ONPlayerDeath -
Keeboo13 - 22.02.2010
plz help me...
Re: PLz Help With ONPlayerDeath -
Onyx09 - 22.02.2010
Give more information how its szr hospital?
Re: PLz Help With ONPlayerDeath -
Keeboo13 - 22.02.2010
its like when a playier dies he lay and a bed doing the crack animation and a little spot