Can someone convert this to dcmd
#2

pawn Код:
// top of script

#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

// onplayertext

dcmd(respond,7,cmdtext);

// bottom of script

dcmd_respond(playerid, params[])
{
    new id, name[24], string[128];
    GetPlayerName(playerid, name, 24);
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "No puedes usar este comando!");
    if(sscanf(params, "us", id, string)) return SendClientMessage(playerid, red, "Usage: /responder [ID] [Mensaje]");
    if(HelpAsked[id] == 0) return SendClientMessage(playerid,red,"Esta persona no ha echo ninguna pregunta!");
    format(string, sizeof string, "{FF00EA} {0000FF} %s {FFFFFF} te ayudarб {FFCC00} a arreglar {FFAF00} tu problema, {FF00EA} Espera un momento!",name);
    SendClientMessage(id, red, string);
    format(string, sizeof string, "{FF00EA}Administrador{FFFFFF} %s:{FFCC00} %s",string);
    SendClientMessage(id, red, string);
    format(string, sizeof string, "Mensaje enviado!! (/pm [%d] [Respuesta])",id);
    SendClientMessage(playerid, red, string);
    HelpAsked[id] = 0;
    return 1;
}
Reply


Messages In This Thread
Can someone convert this to dcmd - by Super_Panda - 04.12.2011, 15:09
Re: Can someone convert this to dcmd - by grand.Theft.Otto - 04.12.2011, 15:33
Re: Can someone convert this to dcmd - by SmiT - 04.12.2011, 15:34
Respuesta: Can someone convert this to dcmd - by Super_Panda - 04.12.2011, 15:38
Re: Can someone convert this to dcmd - by grand.Theft.Otto - 04.12.2011, 15:40
Respuesta: Can someone convert this to dcmd - by Super_Panda - 04.12.2011, 15:43
Re: Can someone convert this to dcmd - by grand.Theft.Otto - 04.12.2011, 15:51

Forum Jump:


Users browsing this thread: 3 Guest(s)