[SOLVED] problem with /report. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] problem with /report. (
/showthread.php?tid=148799)
[SOLVED] problem with /report. -
KDlivest954 - 19.05.2010
it says unknown command in-game. my code:
Код:
dcmd_report(playerid, params[])
{
new id, text;
new string[256],reporter[MAX_PLAYER_NAME], reportee[MAX_PLAYER_NAME];
GetPlayerName(playerid,reporter,sizeof(reporter));
GetPlayerName(id,reportee,sizeof(reportee));
format(string,sizeof(string), "%s has reported %s for: %s",reporter,reportee,text);
if(sscanf(params,"dz",id,text)) SendClientMessage(playerid,COLOR_RED,"USAGE: /report [id] [Message]");
else
{
for(new i=0; i<=MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i) >= 10)
{
SendClientMessage(i, COLOR_RED, string);
}
}
}
return 1;
}
and i get no errors when i compile.
can anyone help? thanks I.A.
Re: [Please help] problem with /report. -
KDlivest954 - 19.05.2010
can anyone see the problem here? cause i dont get it.

please can someone help. thnx I.A.
Re: [Please help] problem with /report. -
agd555 - 19.05.2010
Код:
dcmd_report(playerid, params[])
{
new id, text;
new string[256],reporter[MAX_PLAYER_NAME], reportee[MAX_PLAYER_NAME];
GetPlayerName(playerid,reporter,sizeof(reporter));
GetPlayerName(id,reportee,sizeof(reportee));
format(string,sizeof(string), "%s has reported %s for: %s",reporter,reportee,text);
if(sscanf(params,"dz",id,text)) SendClientMessage(playerid,COLOR_RED,"USAGE: /report [id] [Message]");
else
{
for(new i=0; i<=MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i) == 1)
{
SendClientMessage(i, COLOR_RED, string);
}
}
}
return 1;
}
Re: [Please help] problem with /report. -
KDlivest954 - 19.05.2010
i tied that, it gives me no errors but when i get in-game it says "unknown command"

..........
Re: [Please help] problem with /report. -
KDlivest954 - 19.05.2010
ok, i found 1 problem, i had dcmd(report,5[instead of 6],cmdtext) so i changed it, now when i go in-game, it shows th "USAGE" message i scripted, but wen i use the cmd the right way it says inknown command...
i put
instead of:
Thanks for the help tho.