16.08.2016, 16:21
Solved by relocating the code from setplayerspawn to OnPlayerSpawn. Appreciate the help, however.
Код:
if(FirstSpawn[playerid] != 1) { PlayerInfo[playerid][pDeaths] += 1; SetPlayerHealth(playerid, 25.0); SetPlayerPos(playerid,DX,DY,DZ); SetPlayerInterior(playerid,deathInt[playerid]); SetPlayerVirtualWorld(playerid,worldInt[playerid]); SetTimerEx("BWounded", 500, false, "d", playerid); return 1; }
Код:
public BWounded(playerid){ GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You are wounded ...", 30000, 3); ApplyAnimation(playerid, "PED", "KO_shot_front", 4.1, 0, 1, 1, 1, 3000000, 1); Attach3DTextLabelToPlayer(InjuredLabel[playerid], playerid, 0.0, 0.0, 0.7); SendClientMessage(playerid, COLOR_WHITE, "You are wounded."); SendClientMessage(playerid, COLOR_WHITE, "You cannot /death yet."); isWounded[playerid] = 1; acceptTimer[playerid] = SetTimerEx("AcceptDeath", 30000, false, "d", playerid); }