16.10.2013, 01:41
So I've been trying to get this /suggest CMD to show the players id on a Developer message to say who is posting it and also trying to get it to show up in /suggestions when a developer uses the command in game
Really need some help with my problem
Код:
CMD:suggest(playerid, params[])
{
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /suggest [text]");
if(strlen(params) > 128) return SendClientMessage(playerid, COLOR_GREY, "Maximum characters limit is 128.");
new File: file = fopen("bugs.cfg", io_append), rpnstring[128];
format(rpnstring, sizeof(rpnstring), "[%s] %s\r\n", RPN[playerid], params);
fwrite(file, rpnstring);
fclose(file);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your suggestions has been saved, Developers will check it once possible.");
if(PlayerInfo[playerid][pDev] >= 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "%s has sent a suggestion, Please inform the developers");
}
return 1;
}
CMD:suggestions(playerid, params[])
{
if(PlayerInfo[playerid][pDev] >= 1)
{
new rpnstring[128], File: file = fopen("bugs.cfg", io_read), idx;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "---|| Los Santos Public Roleplay Suggestions ||---:");
while(fread(file, rpnstring))
{
format(rpnstring, sizeof(rpnstring), "%d) %s", idx, rpnstring);
SendClientMessage(playerid, COLOR_LIGHTBLUE, rpnstring);
idx ++;
}
fclose(file);
}
return 1;
}

