Command Help. - 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 Help. (
/showthread.php?tid=256457)
Command Help. -
Alex_Obando - 21.05.2011
pawn Код:
//Hai
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
#define FILTERSCRIPT
#include sscanf2
#include zcmd
#define RED 0xFF0000AA
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);
SendClientMessageToAdmins(COLOR_YELLOW, str); //change this to yours!
return true;
}
stock SendClientMessageToAdmins(color, text[])
{
for(new a, g = GetMaxPlayers(); a < g; a++)
if(IsPlayerConnected(a) && IsPlayerAdmin(a))
SendClientMessage(a, color, text);
}
Re: Command Help. -
grand.Theft.Otto - 21.05.2011
1. You already started a thread.
https://sampforum.blast.hk/showthread.php?tid=256418
2. Where/what's the problem?
Respuesta: Command Help. -
Alex_Obando - 21.05.2011
#include zcmd =
pawn Код:
C:\Users\Alex\Desktop\HydraBlast\filterscripts\Report.pwn(15) : error 017: undefined symbol "SCM"
C:\Users\Alex\Desktop\HydraBlast\filterscripts\Report.pwn(16) : error 017: undefined symbol "RED"
C:\Users\Alex\Desktop\HydraBlast\filterscripts\Report.pwn(17) : error 017: undefined symbol "RED"
C:\Users\Alex\Desktop\HydraBlast\filterscripts\Report.pwn(19) : error 017: undefined symbol "pName"
C:\Users\Alex\Desktop\HydraBlast\filterscripts\Report.pwn(20) : error 017: undefined symbol "SendAdminMessage"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Re: Command Help. -
grand.Theft.Otto - 21.05.2011
Sorry, I don't use zcmd. I use dcmd

So I don't know the problem.
Re: Command Help. -
Laronic - 21.05.2011
I made the whole FS for you
Should work
not tested
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
COMMAND:report(playerid, params[])
{
new targetid, reason[128];
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, 0xFFFFFFAA, "SYNTAX Error: /report (targetid | name) (reason)");
else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFAA, "Error: That player is not connected");
else if(playerid == targetid) return SendClientMessage(playerid, 0xFFFFFFAA, "Error: You cannot report your self");
{
new string[128];
format(string, sizeof(string), "%s(%d) has reported %s(%d) for: %s", PlayerName(playerid), playerid, PlayerName(targetid), targetid, reason);
SendClientMessageToAdmins(0xFFFFFFAA, string);
}
return 1;
}
stock SendClientMessageToAdmins(color, const message[])
{
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
SendClientMessageToAll(color, message);
}
}
stock PlayerName(playerid)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
Respuesta: Command Help. -
Alex_Obando - 21.05.2011
While in-game its unknown command. =/
Respuesta: Command Help. -
Alex_Obando - 21.05.2011
Bump.
Re: Command Help. -
wheelman_WM - 21.05.2011
lol dude u r a stealer no one gonna help you stealer
Respuesta: Command Help. -
Alex_Obando - 21.05.2011

?