[Pedido] Codigo de /anuncio simples?
#1

Alguem ai tem um codigo de /anuncio para servidor rpg simples nгo precisa ter muita coisa sу aparecer que mandou anuncio de ls e o custo sу isso.
Reply
#2

?
Reply
#3

Como assim cara vc quer estilo BPG?
Reply
#4

Acho que vocк precisa ser mais detalhado.
Reply
#5

tipo assim mano sу um comando de mandar /anuncio - /an que nгo tenha muitas funзхes sу mandar o /an e aguardar alguns segundos sу isso..
Reply
#6

ZCMD ou strcmp ?
Reply
#7

que? /\
Reply
#8

pawn Код:
new timerAnuncio;
new str[128];

if ( !strcmp(cmdtext, "/anuncio") || !strcmp(cmdtext, "/an") ) {

    if ( timerAnuncio < gettime() ) {

        format (str, sizeof str, "Um anъncio foi mandado recentemente! Aguarde %i segundos para mandar o seu!", (gettime() - timerAnuncio) );
        SendClientMessage(playerid, -1, str);
        return 1;
    }

    if ( strlen(cmdtext) <= 9 )
        return SendClientMessage(playerid, -1, "Uso correto: /anuncio [mensagem]");

    new Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);

    format (str, sizeof str, "Anъncio de %s: %s", Nome, cmdtext[9]);
    SendClientMessageToAll(-1, str);

    timerAnuncio = gettime() + 30;

    return 1;
}
Reply
#9

iCasTiel funfou certinho mais quando entrei no meu servidor e digitei /an apareceu isso
Reply
#10

pawn Код:
new timerAnuncio;
new str[128];
Variбveis globais, fora da OnPlayerCommandText!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)