12.01.2014, 12:59
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.