PDA

View Full Version : Death mode help


glizzy561
10/07/2017, 07:56 PM
I was working on a death script sort of like ls-rp's but i cant get the animation to work properly can anyone help ?

oSAINTo
10/07/2017, 09:59 PM
Show your code.

Also:
http://forum.sa-mp.com/showthread.php?t=634344

glizzy561
12/07/2017, 08:01 AM
}
else if(PlayerDied[playerid] == 1) {

SetPlayerPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
SetPlayerInterior(playerid, DeadInt[playerid]);
SetPlayerVirtualWorld(playerid, DeadWorld[playerid]);
SetPlayerCameraPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]+5);
SetPlayerCameraLookAt(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
TogglePlayerControllable(playerid, 0);
SetTimerEx("FallPlayer", 1000, 0, "d", playerid);
SetPlayerDrunkLevel(playerid, 3000);
SendClientMessage(playerid, COLOR_LIGHTRED, "You were brutally wounded,now if a medic or anyone else doesn't save you,you will die.");
SendClientMessage(playerid, COLOR_LIGHTRED, "To accept death type /acceptdeath.");
pUncountious[playerid] = 1;
gPlayerUsingLoopingAnim[playerid] = 1;
dying[playerid] = 1;
Usinganim[playerid] = 1;
return 1;
}
else if(DoneSpecing[playerid] == 0) {
if(UsingSkin[playerid] == 1) {
if(CanPlayerUseSkin(GetPlayerSkin(playerid),player id)) {
PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
}
else {
SendClientMessage(playerid,COLOR_LIGHTRED,"Your spawn skin has been changed due to its restricted for you.");
if(PlayerInfo[playerid][pSex] == 1) {
PlayerInfo[playerid][pModel] = 26;
SetPlayerSkinEx(playerid, PlayerInfo[playerid][pModel]);
}
else {
PlayerInfo[playerid][pModel] = 93;
SetPlayerSkinEx(playerid, PlayerInfo[playerid][pModel]);
}
}
Hospitalized[playerid] = 0;
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
UsingSkin[playerid] = 0;
DOO_SetPlayerPos(playerid,PlayerInfo[playerid][Clothesx],PlayerInfo[playerid][Clothesy],PlayerInfo[playerid][Clothesz]);
SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][Clothesw]);
SetPlayerInterior(playerid,PlayerInfo[playerid][Clothesi]);
IntEntered[playerid] = PlayerInfo[playerid][Clothesent];
return 1;
}
if(UsingSpawnBar[playerid] == 0) {
SetPlayerRandomSpawn(playerid,1);
}
}
}
return 1;
}

coool
12/07/2017, 08:27 AM
Wrap your code with and

kubak01
12/07/2017, 09:22 AM
You would want to preload animation libraries most probably.

Abagail
12/07/2017, 02:52 PM
Funnily enough, I don't see a single ApplyAnimation or function that could suggest it's playing an animation.

glizzy561
12/07/2017, 04:03 PM
Funnily enough, I don't see a single ApplyAnimation or function that could suggest it's playing an animation.

thats what I need help with , im new at this

kubak01
12/07/2017, 05:06 PM
Oh. Well, there you go. The default death animation is pretty ok i guess.

ApplyAnimation(playerid, "PED", "KO_shot_front",4.1,0,1,1,1,1);

Preview on how it looks: https://streamable.com/b5rod