GTAONLINE.PL
Użytkownicy
Grupy
FAQ
Regulamin
Piwa
Reklama/Vip
Raporty
Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: ann
1.
[INNE] ANN nie działa
Witam
Chchai?bym si? zapyta? co jest ?le ?e nie dzia?a kod:
Kod:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
//Defines
#define COLOR_GREEN 0x33AA33AA
//Command
CMD:ann(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, COLOR_GREEN, "You are not allowed to use this command!");
new text[64], time, style;
if (sscanf(params, "iis[64]", style, time, text)) return
SendClientMessage(playerid, COLOR_GREEN, "Usage: /announce <style[0-6]> <time in ms> <text>");
if (strlen(text) > 64) return
SendClientMessage(playerid, COLOR_GREEN, "Message too long please shorten it!");
if(style == 2) return SendClientMessage(playerid, COLOR_GREEN, "Bug with style 2 don't use it!");
if (style < 0 || style > 6) return
SendClientMessage(playerid, COLOR_GREEN,"Invalid style!");
if (time > 20*1000) return
SendClientMessage(playerid, COLOR_GREEN, "No longer than 20 seconds!");
GameTextForAll(text, time, style);
return 1;
}
prosze o poprawienie