[Ajuda] Upgrade Caixinha de Presente
#2

pawn Код:
if(PlayerToPoint(5.0,playerid,1472.7687,-1714.8226,15.1903))
{
    new DinheiroCaixinha = 1000 + random(20000);
    new RespeitoCaixinha = random(5);
    if(PlayerInfo[playerid][pCaixinha] == char)
    {
        SendClientMessage(playerid, COLOR_GRAD1, "Vocк pegou uma Caixinha hб pouco tempo, volte novamente apуs o prуximo salбrio!");
        return 1;
    }

    if ( JogadoresContectados() < 10 )
    {
        SendClientMessage ( playerid , COLOR_GRAD1 , "Caixinhas sу pode ser utilizadas com 10 jogadores conectados !" ) ;
        return 1;
    }

    new string[128];
    PlayerInfo[playerid][pCaixinha] = char;
    format(string, sizeof(string), "Player: [%s] pegou uma Caixinha, %d de dinheiro e %d de respeito, Corra para Pegar a Sua !.",PlayerName(playerid),DinheiroCaixinha, RespeitoCaixinha);
    SendClientMessageToAll(COR_COSA,string);
    GivePlayerMoney(playerid, DinheiroCaixinha);
    PlayerInfo[playerid][pExp] += RespeitoCaixinha;
    SendClientMessage(playerid, COR_BALLAS, "{A020F0}Vocк ganhou uma caixinha de presente,volte novamento apуs o prуximo salбrio!");
    format(string, sizeof(string), "{A020F0}Na caixinha continha %d de dinheiro e %d de respeito !",
    DinheiroCaixinha, RespeitoCaixinha);
    SendClientMessage(playerid, COR_BALLAS, string);

}


JogadoresConectados()
{
    new Jogadores = 0 ;

    for ( new i ; i < MAX_PLAYERS ; ++ i )
        if ( IsPlayerConnected ( i ) )
            ++ Jogadores;

    return Jogadores;
}
Tenta Ai
Reply


Messages In This Thread
Upgrade Caixinha de Presente - by MaLaLvisK - 26.08.2013, 23:45
Re: Upgrade Caixinha de Presente - by Juniiro3 - 26.08.2013, 23:52

Forum Jump:


Users browsing this thread: 2 Guest(s)