[Ajuda] Ajuda life
#1

to aqui fazendo uma fs, queria saber se й possнvel e como fazer isso tipo.
Eu congelei o cara, se o cara perder 5 de life = ele e descongelado automaticamente.
Reply
#2

Use uma variбvel booleana para saber se ele foi congelado, e a callback OnPlayerTakeDamage.
Reply
#3

tipo isso, basta adaptar:
pawn Код:
new bool:playerCongelado[MAX_PLAYERS];

if(!strcmp(cmdtext, "/mecongelar", true))
{
    playerCongelado[playerid] = true;
    TogglePlayerControllable(playerid, false);
    return 0x01;
}

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(amount >= 5.0 && playerCongelado[playerid])
        TogglePlayerControllable(playerid, true), playerCongelado[playerid] = false;
    return 1;
}
Reply
#4

Quote:
Originally Posted by Falcon.
Посмотреть сообщение
tipo isso, basta adaptar:
pawn Код:
new bool:playerCongelado[MAX_PLAYERS];

if(!strcmp(cmdtext, "/mecongelar", true))
{
    playerCongelado[playerid] = true;
    TogglePlayerControllable(playerid, false);
    return 0x01;
}

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(amount >= 5.0 && playerCongelado[playerid])
        TogglePlayerControllable(playerid, true), playerCongelado[playerid] = false;
    return 1;
}
deu erro : error 025: function heading differs from prototype em
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
Reply
#5

Quote:
Originally Posted by LeandroSantos
Посмотреть сообщение
deu erro : error 025: function heading differs from prototype em
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
Tб usando qual versгo do sa-mp?
Reply
#6

Atualiza as suas includes nativas

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

baixa elas aqui:

sa-mp.com/download.php
Reply
#7

Foi, nгo tinha reparado. vlw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)