/admin and /msg not working
#7

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
Can you post the code that you're trying with now, incase I'm looking back at my code but you tried code before i edited it
pawn Код:
CMD:msg(playerid,params[])
{
    new id, str[128],message[128];
    if(pInfo[playerid][pAdmin] < 1) return 0;
    print("reached 1");
    if(sscanf(params,"us[128]",id,message)) return SCM(playerid, COLOR_WHITE,"Syntax: /msg [playerid/partofname] [message]");
    print("reached 2");
    format(str, sizeof(str), "{FF0000}Message From Admin:{FFFFFF}%s(%d)", PlayerName(playerid), playerid);
    print("reached 3");
    ShowPlayerDialog(id, anotice, DIALOG_STYLE_MSGBOX, str,message,"Close","");
    print("reached 4");
    format(str, sizeof(str), "{1B8AE4}%s(%d){FFFFFF} messaged {1B8AE4}%s(%d){FFFFFF}: %s", PlayerName(playerid), playerid, PlayerName(id), id, message);
    print("reached 5");
    SendMessageToAdmins(-1, str);
    return 1;
}

CMD:admin(playerid,params[])
{
    new message, adminmsg[128];
    if(sscanf(params,"s[128]",message)) return SCM(playerid, COLOR_WHITE,"Syntax: /admin [message]");
    print("reached A");
    format(adminmsg, sizeof(adminmsg), "Message From: {1B8AE4}%s(%d){FFFFFF}: %s", PlayerName(playerid), playerid, message);
    print("reached B");
    SendMessageToAdmins(-1, adminmsg);
    print("reached C");
    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: 2 Guest(s)