AJUDA com bloquear pm
#4

Quote:
Originally Posted by DraKoN
Посмотреть сообщение
pawn Код:
new recieverid;
new h, mi, s;
new y1, m, d;
gettime(h,mi,s);
getdate(y1, m, d);
new string[128];
new string5[128];
new cmd[128];
new tmp[128];
new Message[128];
new gMessage[128];
new pName[70];
new temp[128];
new iName[70];
new idx;
cmd = strtok(cmdtext, idx);
if(strcmp("/pm", cmd, true) == 0)
{
    tmp = strtok(cmdtext,idx);

    if(!strlen(tmp) || strlen(tmp) > 5) {
        SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /pm (id) (mensagem)");
        return 1;
    }

    new id = strval(tmp);
    gMessage = strrest(cmdtext,idx);

    if(!strlen(gMessage)) return SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /pm (id) (mensagem)");

    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/pm : ID Errado");
    if(PMBlocked[id] == 1) return SendClientMessage(playerid, 0x00FFFFFF, "[ERRO]: Este player nгo estб querendo receber PM'S no momento!");
    {
        if(playerid != id) {
            GetPlayerName(id,iName,sizeof(iName));
            GetPlayerName(playerid,pName,sizeof(pName));
            format(Message,sizeof(Message),"PM enviado para %s(%d): %s",iName,id,gMessage);
            GameTextForPlayer(id, "~w~MENSAGEM ENVIADA", 5000, 5);
            SendClientMessage(playerid,PM_OUTGOING_COLOR,Message);
            format(Message,sizeof(Message),"PM recebido de %s(%d): %s",pName,playerid,gMessage);
            GameTextForPlayer(id, "~w~MENSAGEM RECEBIDA", 5000, 5);
            SendClientMessage(id,PM_INCOMING_COLOR,Message);
            TextDrawHideForPlayer(recieverid, OtrzymalesPM);
            TextDrawShowForPlayer(recieverid, OtrzymalesPM);
            SetTimerEx("HideTDFromPlayer", 5000, 0, "di", recieverid, _:OtrzymalesPM);
            PlayerPlaySound(id,1085,0.0,0.0,0.0);
            format(string5, sizeof(string5), "[Data:%d/%d/%d] [Hora:%d:%d:%d] PM de %s para %s: %s",d,m,y1,h,mi,s, pName,iName, gMessage);
            PMLog(string5);
            format(string5, sizeof(string5), "PM de %s(ID:%d) para %s(ID:%d): %s" , pName, playerid,iName, id, gMessage);
            SendPMToAdmins(0x00ffaaFF, string5, 6);
            printf("PM: %s",Message);
        }
        else {
            SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"[ERRO]: Vocк nгo pode mandar pm pra vocк mesmo.");
        }
        return 1;
    }
Deu 3 erros =/

pawn Код:
C:\Users\Marcelo\Desktop\samp03asvr_R7_win32\gamemodes\90.pwn(23251) : error 047: array sizes do not match, or destination array is too small
C:\Users\Marcelo\Desktop\samp03asvr_R7_win32\gamemodes\90.pwn(23254) : error 047: array sizes do not match, or destination array is too small
C:\Users\Marcelo\Desktop\samp03asvr_R7_win32\gamemodes\90.pwn(23262) : error 047: array sizes do not match, or destination array is too small
Linha do erro 1: cmd = strtok(cmdtext, idx);
Linha do erro 2: tmp = strtok(cmdtext,idx);
Linha do erro 3: gMessage = strrest(cmdtext,idx);
Reply


Messages In This Thread
AJUDA com bloquear pm - by [GET]Vidaloka - 29.08.2010, 20:17
Re: AJUDA com bloquear pm - by CyNiC - 29.08.2010, 20:50
Respuesta: AJUDA com bloquear pm - by ipsBruno - 29.08.2010, 22:29
Re: Respuesta: AJUDA com bloquear pm - by [GET]Vidaloka - 29.08.2010, 23:29
Re: AJUDA com bloquear pm - by [GET]Vidaloka - 31.08.2010, 17:37
Re: AJUDA com bloquear pm - by Gustavob - 31.08.2010, 17:50
Re: AJUDA com bloquear pm - by [GET]Vidaloka - 31.08.2010, 18:52

Forum Jump:


Users browsing this thread: 1 Guest(s)