SA-MP Forums Archive
[PEDIDO] /tvida /tcolete - 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: [PEDIDO] /tvida /tcolete (/showthread.php?tid=325519)



[PEDIDO] /tvida /tcolete - gcoder - 13.03.2012

Alguem sabe onde posso encontrar algum tutorial ou codigo de /tvida e /tcolete para enxer vida e colete de todos online? alguem ajuda? sou iniciante


Re: [PEDIDO] /tvida /tcolete - zbt - 13.03.2012

pawn Код:
if ( strcmp ( cmdtext , "/tvida" , true ) == 0 ) {
    for ( new i = 0 ; i < GetMaxPlayers ( ) ; i++ ) {
        SetPlayerHealth ( i , 100 ) ;
    }
    return true ;
}
faзa o mesmo com o tcolete, apenas mude o SetPlayerHealth para SetPlayerArmor.


Re: [PEDIDO] /tvida /tcolete - Lуs - 13.03.2012

pawn Код:
CMD:tvida(playerid)
{
    foreach(Player, i)
    {
        SetPlayerHealth(i, 100);
    }
    new Nome[ MAX_PLAYER_NAME ], string[ 128 ], GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
    format(string, sizeof(string), "O administrador %s, restaurou a vida de todos online!", Nome);
    SendClientMessageToAll(-1, string);
    return 1;
}

CMD:tcolete(playerid)
{
    foreach(Player, i)
    {
        SetPlayerArmour(i, 100);
    }
    new Nome[ MAX_PLAYER_NAME ], string[ 128 ], GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
    format(string, sizeof(string), "O administrador %s, restaurou o colete de todos online!", Nome);
    SendClientMessageToAll(-1, string);
    return 1;
}