18.05.2013, 14:07
How to make this command in ZCMD?
pawn Код:
if (strcmp("/News", cmdtext, true, 5) == 0)
{
new file[128];
format(file, sizeof(file), "News.ini");
if(IsPlayerAdmin(playerid)){
new string[256];
strmid(string, cmdtext, 6, 256);
dini_Set(file, "News", string);
new thing[256];
thing = dini_Get(file, "News");
format(string, sizeof(string), "Server News: %s", thing);
SendClientMessage(playerid, GREEN, string);
}
else
{
SendClientMessage(playerid, GREEN, "You have to be logged into RCON in order to change the News!");
}
return 1;
}
return 0;
}