SA-MP Forums Archive
How to make RP on playerdeath ? - 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: How to make RP on playerdeath ? (/showthread.php?tid=487224)



How to make RP on playerdeath ? - barts - 12.01.2014

When playerdie to be injured and to wait for paramedic to come and help.How to make it


Respuesta: How to make RP on playerdeath ? - Stront - 12.01.2014

You'll need to store the variables for VW, INT and POS if you want to make it active for all interiors and all virtualworlds in OnPlayerDeath, for example:

Код:
//At the top of the script:

new Float:posX[MAX_PLAYERS], Float:posY[MAX_PLAYERS], Float:posZ[MAX_PLAYERS];
new VW[MAX_PLAYERS], INTERIOR[MAX_PLAYERS];

// OnPlayerDeath

GetPlayerPos(playerid, posX[playerid], posY[playerid], posZ[playerid]);
INTERIOR[playerid] = GetPlayerInterior(playerid);
VW[playerid] = GetPlayerVirtualWorld(playerid);

// Then, you should detect class selection and spawn player sending the pos and putting player in position.

SetPlayerPos(playerid, posX[playerid], posY[playerid], posZ[playerid]);
SpawnPlayer(playerid);

// OnPlayerSpawn

SetPlayerPos(playerid, posX[playerid], posY[playerid], posZ[playerid]);
SetPlayerInterior(playerid, INTERIOR[playerid]);
SetPlayerVirtualWorld(playerid, VW[playerid]);
// You can set an animation if you want.
// Now you have to send a message to the medic faction. I don't know how your system goes so I can't help you more.



Re: How to make RP on playerdeath ? - barts - 12.01.2014

WTF is this ?