megaphone
#8

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
ok i cant believe I missed that lol. But I tried it and adding "good" after each function, and they all work
the message just doesnt return for some reason

pawn Код:
CMD:megaphone(playerid, params[])
{
    if(!IsPlayerLEO(playerid)) return ErrorMessage(pid, "You are not LEO.");
    new string[128], message[100];
    if(sscanf(params,"s[100]", message)) return UsageMessage(pid, "/m(egaphpone) [message]");
    SCM(pid, -1, "Good1");
    format(string, sizeof(string), "[Megaphone]: %s", message);
    SCM(pid, -1, "Good2");
    ProxDetector(50.0, playerid, string, 0xFF8C00AA);
    SCM(pid, -1, "Good3");
    return 1;
}
Check the server log and if there is sscanf warning: Strings without a length are deprecated, please add a destination size.
enlarge the placeholder size: message[128] or even to 256 cells ?
Reply


Messages In This Thread
megaphone - by Mattakil - 01.12.2013, 22:47
Re: megaphone - by Wizzy951 - 01.12.2013, 22:49
Re: megaphone - by Hansrutger - 01.12.2013, 22:58
Re: megaphone - by Mattakil - 01.12.2013, 23:06
Re: megaphone - by Hansrutger - 01.12.2013, 23:14
Re: megaphone - by Mattakil - 01.12.2013, 23:18
Re: megaphone - by Hansrutger - 01.12.2013, 23:21
Re: megaphone - by Wizzy951 - 01.12.2013, 23:25
Re: megaphone - by Mattakil - 01.12.2013, 23:49
Re: megaphone - by Hansrutger - 02.12.2013, 09:11

Forum Jump:


Users browsing this thread: 1 Guest(s)