/admin and /msg not working
#1

So, i'm working on an (/admin) command so they can message an admin about something and I've made a (/msg) command to message them back with an answer for example.

It isn't working, just gives an error that the command doesn't exist, here are the commands:
pawn Код:
CMD:msg(playerid, params[])
{
    new id, str1[128], str2[128], message, adminmsg[128];
    if(pInfo[playerid][pAdmin] < 1) return 0;
    if(sscanf(params,"us[128]",id,message)) return SCM(playerid, COLOR_WHITE,"Syntax: /msg [playerid/partofname] [message]");
    format(str1, sizeof(str1), "%s", params);
    format(str2, sizeof(str2), "{FF0000}Message From Admin:{FFFFFF}%s(%d)", PlayerName(playerid), playerid);
    ShowPlayerDialog(playerid, anotice, DIALOG_STYLE_MSGBOX, str2,str1,"Close","");
    format(adminmsg, sizeof(adminmsg), "{1B8AE4}%s(%d){FFFFFF} messaged {1B8AE4}%s(%d){FFFFFF}: %s", PlayerName(playerid), playerid, PlayerName(id), id, message);
    SendMessageToAdmins(-1, adminmsg);
    return 1;
}

CMD:admin(playerid, params[])
{
    new message, adminmsg[128];
    if(sscanf(params,"s[128]",message)) return SCM(playerid, COLOR_WHITE,"Syntax: /admin [message]");
    format(adminmsg, sizeof(adminmsg), "Message From: {1B8AE4}%s(%d){FFFFFF}: %s", PlayerName(playerid), playerid, message);
    SendMessageToAdmins(-1, adminmsg);
    SCM(playerid, -1, "Your message has been sent to all online admins.");
    return 1;
}
Reply


Messages In This Thread
/admin and /msg not working - by Jimmy0wns - 29.03.2014, 15:12
Re: /admin and /msg not working - by EiresJason - 29.03.2014, 15:23
Re: /admin and /msg not working - by Jimmy0wns - 29.03.2014, 16:04
Re: /admin and /msg not working - by EiresJason - 29.03.2014, 16:05
Re: /admin and /msg not working - by Jimmy0wns - 29.03.2014, 16:07
Re: /admin and /msg not working - by EiresJason - 29.03.2014, 16:11
Re: /admin and /msg not working - by Jimmy0wns - 29.03.2014, 16:12
Re: /admin and /msg not working - by EiresJason - 29.03.2014, 16:14
Re: /admin and /msg not working - by Jimmy0wns - 29.03.2014, 16:14
Re: /admin and /msg not working - by Youssef214 - 29.03.2014, 16:15

Forum Jump:


Users browsing this thread: 3 Guest(s)