Command - 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: Command (
/showthread.php?tid=256418)
Command -
Alex_Obando - 20.05.2011
Solved.
Respuesta: Command -
Alex_Obando - 20.05.2011
Bump
Re: Command -
SpiderWalk - 20.05.2011
show me codes!
Respuesta: Command -
Alex_Obando - 20.05.2011
Solved.
Re: Command -
Markx - 20.05.2011
Quote:
Originally Posted by SpiderWalk
show me codes!
|
Anyway, why dont you use sscanf for it? and make it like:
pawn Код:
new id, reason[some string];
if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, red, "Usage: /report [id] [reason]");
//other code below.
Respuesta: Command -
Alex_Obando - 20.05.2011
Can you make me a report system then?
I just need the reporter, the reported, and the reason.
Edit* You dont need to add the strock due I already have my sendclientmessagetoadmins strock.
Re: Respuesta: Command -
Markx - 20.05.2011
Quote:
Originally Posted by Alex_Obando
Can you make me a report system then?
I just need the reporter, the reported, and the reason.
Edit* You dont need to add the strock due I already have my sendclientmessagetoadmins strock.
|
Here ya go:
pawn Код:
CMD:report(playerid, params[])
{
new aName[MAX_PLAYER_NAME], str[128], reason, iD;
if (sscanf(params, "dz", iD, reason)) return SCM(playerid, RED, "* Usage : /report [PlayerID/Name] [Reason]");
if (iD == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR : Invaild PlayerID");
if (playerid == iD) return SendClientMessage(playerid, RED, "ERROR : You cannot report yourself");
GetPlayerName(iD, aName, sizeof(aName));
format(str, sizeof(str), "%s(%d) has reported %s(%d) for : %s", pName(playerid), playerid, aName, iD, reason);
SendAdminMessage(COLOR_YELLOW, str); //change this to yours!
return true;
}
Respuesta: Command -
Alex_Obando - 20.05.2011
Solved.
Re: Command -
Laronic - 20.05.2011
You must include zcmd too
#include <zcmd>