bugged /pm command
#3

pawn Код:
if(strcmp("/mp", cmd, true) == 0)
    {
   
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, CINZENTO, "USO: /mp [Player-Id] [MENSAGEM]");
    otherid = ReturnUser(tmp);
    if(!IsPlayerConnected(otherid)) return SendClientMessage(playerid, CINZENTO, "Player Desconectado");
    new message[128];
    message = strrest(cmdtext, idx);
    if(!strlen(message)) return SendClientMessage(playerid, CINZENTO, "USO: /mp [Player-Id] [MENSAGEM]");
    if(strlen(message) > 55) return SendClientMessage(playerid, CINZENTO, "Mensagem Demasiado Grande");
    if(otherid == playerid) return SendClientMessage(playerid, CINZENTO, "Vocк nгo pode enviar uma mensagem a si prуprio");
    if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, CINZENTO, "Sem Dinheiro Suficiente ($20)");
    format(string, sizeof(string), "Mensagem de: %s: %s", PlayerName(playerid), message);
    SendClientMessage(otherid, AMARELO, string);
    format(string, sizeof(string), "Enviado a %s: %s", PlayerName(otherid), message);
    SendClientMessage(playerid, AMARELO, string);
    GivePlayerMoney(playerid, -20);
    return 1;
    }

Strrest:
https://sampwiki.blast.hk/wiki/Functiontrrest


Try to compair...
Reply


Messages In This Thread
bugged /pm command - by Dark Crow - 24.02.2012, 19:16
Re: bugged /pm command - by mitchboy - 24.02.2012, 19:46
Re: bugged /pm command - by andmeida10 - 24.02.2012, 20:46

Forum Jump:


Users browsing this thread: 1 Guest(s)