[Ajuda] Include Zcmd e Sscanf
#1

Galeras tou tendo Problemas com a Return desse Comando. Ele sempre retorna nunca dб certo.

Код:
CMD:sos(playerid, params[])
{
    new Texto[126], snd[MAX_PLAYER_NAME];
    GetPlayerName(playerid,snd,sizeof(snd));
    if(sscanf(params, "s[126]", Texto)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Use /sos [Dъvida aqui]");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            format(String, sizeof(String), "{FA5282}[ HELP ] por %s [%d]: %s", snd, playerid, Texto);
            GameTextForPlayer(i, "~r~NOVATO PEDIU AJUDA!", 3000, 3);
            SendClientMessage(i, 0xEAEA00AA, String);
        }
    }
    SendClientMessage(playerid, VERMELHO_ESCURO, "[ > ] Pedido de ajuda enviado com sucesso!");
    return 1; 
}
Esse jб funfa
Код:
CMD:setlevel(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 2000) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Vocк nгo й Administrador!");
    new qnt, string[126], pname[MAX_PLAYER_NAME], giverid;
    if(sscanf(params, "ud", giverid, qnt)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso: /setlevel [ID] [level]");
    if(!IsPlayerConnected(giverid)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Jogador nгo conectado.");
    GetPlayerName(giverid, pname, MAX_PLAYER_NAME);
 	format(string, sizeof(string), "{00FF00}[NVC Admin] Vocк setou o level do Jogador %s para %d .", pname, qnt);
 	SendClientMessage(playerid, AZUL, string);
   	format(string, sizeof(string), "{00FF00}[NVC Admin] O  administrador  %s setou seu level para %d .", nome(playerid), qnt);
 	SendClientMessage(giverid, AZUL, string);
    print(string);
    DOF2_SetInt(arquivo, "Level", qnt);
    SetPlayerScore(giverid, qnt);
    DOF2_SaveFile();
    return 1;
}
Reply


Messages In This Thread
Include Zcmd e Sscanf - by Lucas_Pawno - 26.09.2012, 02:02
Re: Include Zcmd e Sscanf - by Maklister - 26.09.2012, 02:08
Re: Include Zcmd e Sscanf - by [BOPE]Seu._.Madruga - 26.09.2012, 02:11
Re: Include Zcmd e Sscanf - by Lucas_Pawno - 26.09.2012, 02:11
Re: Include Zcmd e Sscanf - by Schocc - 26.09.2012, 02:15
Re: Include Zcmd e Sscanf - by Maklister - 26.09.2012, 02:20
Re: Include Zcmd e Sscanf - by Lucas_Pawno - 26.09.2012, 02:21
Re: Include Zcmd e Sscanf - by Schocc - 26.09.2012, 02:24
Re: Include Zcmd e Sscanf - by Maklister - 26.09.2012, 02:25
Re: Include Zcmd e Sscanf - by Q.I - 26.09.2012, 10:52

Forum Jump:


Users browsing this thread: 5 Guest(s)