[Pedido] Quando jogador morrer, voltar pro local da morte com anime.
#1

Olб eu nгo quero dar muito trabalho para vocкs, nгo precisa fazer o code, sу me dar um pouco de noзгo, porque sou meio noob ainda, queria que quando o player morre-se, setava a posiзгo antiga de onde ele morreu, e ele ia voltar com essa animaзгo

Код:
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
e "congelado"

Код:
TogglePlayerControllable
й sу para eu ter uma noзгo mesmo. Obrigado.
Reply
#2

Coloca algo que quando a life dele for abaixo de 1 , ele fazer isso ai e setar a life dele pra 100 e pegar a posiзгo e seta-la em um certo tempo (cerca de 3 ~ 4 depois de morrer)
Reply
#3

Como assim, seta-la em um certo tempo cerca de 3 - 4 depois de morrer ?


EDIT: Isso seria mais ou menos
Код:
OnPlayerGiveDamage
?

EDIT: Vish nгo entendi e.e, seria tipo um OnPlayerDeath e depois GetPlayerPosition mais ApplyAnimation e um TogglePlayerControllable ?
Reply
#4

Quando morrer?

pawn Код:
new pTimer [ MAX_PLAYERS ] = {-1, ...};

public OnPlayerDeath(playerid, killerid, reason){

    static Float: pos[3] ;
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
 
    pTimer[playerid] = SetTimerEx("VoltarPos", 5000, false, "fffi",pos[0], pos[1], pos[2], playerid);

    return true ;
}

forward VoltarPos(Float:x, Float:y, Float:z, i);
public VoltarPos(Float:x, Float:y, Float:z,  i) {

    SetPlayerPos(i, x, y, z);
    ApplyAnimation(i, "CRACK", "crckdeth2", 4.1,1,1,1,1,1,1);
    pTimer[i] = -1;

    return 1;
}
Para evitar problemas caso o jogador desconectar e pegar o id errado. Use KillTimer(pTimer[playerid] ); quando ele desconecta

-* Tem um jeito melhor trabalhando com OnPlayerSpawn. Mas fiz por timer mesmo. *-
#nгotestei
Reply
#5

Quote:
Originally Posted by ipsBruno
Посмотреть сообщение
Quando morrer?

pawn Код:
new pTimer [ MAX_PLAYERS ] = {-1, ...};

public OnPlayerDeath(playerid, killerid, reason){

    static Float: pos[3] ;
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
 
    pTimer[playerid] = SetTimerEx("VoltarPos", 5000, false, "fffi",pos[0], pos[1], pos[2], playerid);

    return true ;
}

forward VoltarPos(Float:x, Float:y, Float:z, i);
public VoltarPos(Float:x, Float:y, Float:z,  i) {

    SetPlayerPos(i, x, y, z);
    ApplyAnimation(i, "CRACK", "crckdeth2", 4.1,1,1,1,1,1,1);
    pTimer[i] = -1;

    return 1;
}
Para evitar problemas caso o jogador desconectar e pegar o id errado. Use KillTimer(pTimer[playerid] ); quando ele desconecta

-* Tem um jeito melhor trabalhando com OnPlayerSpawn. Mas fiz por timer mesmo. *-
#nгotestei

Eu acho que coloquei algo errado



Код:
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(4548) : warning 219: local variable "price" shadows a variable at a preceding level
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(4590) : warning 219: local variable "price" shadows a variable at a preceding level
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(4632) : warning 219: local variable "price" shadows a variable at a preceding level
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(4954) : warning 219: local variable "price" shadows a variable at a preceding level
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(6734) : warning 219: local variable "caller" shadows a variable at a preceding level
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7411) : error 021: symbol already defined: "SendDeathMessage"
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7421) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7422) : warning 218: old style prototypes used with optional semicolumns
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7423) : warning 218: old style prototypes used with optional semicolumns
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7425) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7429) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7431) : warning 218: old style prototypes used with optional semicolumns
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7432) : error 054: unmatched closing brace ("}")
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7433) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7435) : warning 218: old style prototypes used with optional semicolumns
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7436) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7438) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7440) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7442) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7446) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7451) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7453) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7457) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7462) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7464) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7468) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7475) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7479) : error 017: undefined symbol "playerid"
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7479) : error 008: must be a constant expression; assumed zero
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7480) : error 010: invalid function or declaration
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7485) : error 021: symbol already defined: "GivePlayerMoneyEx"
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7485) : error 029: invalid expression, assumed zero
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7487) : error 021: symbol already defined: "GivePlayerMoneyEx"
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7487) : warning 215: expression has no effect
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7487) : error 001: expected token: ";", but found ")"
C:\Users\Hermes\Desktop\Brasil Mбfia RPG\Brasil Magic Games\gamemodes\BMG.pwn(7499) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#6

Deixo alguma chave aberta
Reply
#7

pawn Код:
}
}
Reply
#8

Quote:
Originally Posted by matheus_alcapone
Посмотреть сообщение
Deixo alguma chave aberta
Foi nesse code, aonde que eu deixei ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)