SA-MP Forums Archive
[Ajuda] Ajuda life - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda life (/showthread.php?tid=548081)



Ajuda life - LeandroSantos - 27.11.2014

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.


Re: Ajuda life - MultiKill - 27.11.2014

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


Re: Ajuda life - Falcon. - 27.11.2014

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;
}



Re: Ajuda life - LeandroSantos - 27.11.2014

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)



Re: Ajuda life - n0minal - 27.11.2014

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?


Re: Ajuda life - PT - 27.11.2014

Atualiza as suas includes nativas

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

baixa elas aqui:

sa-mp.com/download.php


Re: Ajuda life - LeandroSantos - 27.11.2014

Foi, nгo tinha reparado. vlw.