[URGENT] How can i make AdmWarnings when someone uses /rcon say -
D3vin - 05.05.2014
Well i need some warnings for admins rank 100001 only who can see it cause someone is using /rcon Say i don't even know if it's /asay or /rcon say please help
i made this
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
format(string, sizeof(string), "{FF0000}AdmWarning{FFFF00}: %s has attempted to login on the Rcon.",sendername);
ABroadCast(COLOR_WHITE,string,100001);
}
worked fine but when i made this but dont get any warnings like Name is using Rcon say.
pawn Код:
public OnRconCommand(cmd[])
{
if(strcmp(cmd, "safegmx", true) == 0)
{
GameModeInitExitFunc();
return 1;
}
if(strcmp(cmd, "say", true) == 0)
{
format(string, sizeof(string), "{FF0000}AdmWarning{FFFF00}: %s is using Rcon SAY to chat" .",sendername);
ABroadCast(COLOR_WHITE,string,100001);
return 1;
}
return 0;
}
didn't get any errors but the warning isn't working when i /rcon say Hi
btw that safegmx i didn't make it i found it there but didn't really work so it's useless
Re: [URGENT] How can i make AdmWarnings when someone uses /rcon say -
Eth - 05.05.2014
pawn Код:
public OnRconCommand(cmd[])
{
if(strcmp(cmd, "safegmx", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You are not admin to use this command");
GameModeInitExitFunc();
return 1;
}
if(strcmp(cmd, "say", true) == 0)
{
if(!IsPlayerAdmin(sendername)) return SendClientMessage(playerid,-1,"You are not admin to use this command");
format(string, sizeof(string), "{FF0000}AdmWarning{FFFF00}: %s is using Rcon SAY to chat" .",sendername);
ABroadCast(COLOR_WHITE,string,100001);
return 1;
}
return 0;
}
Re : [URGENT] How can i make AdmWarnings when someone uses /rcon say -
D3vin - 05.05.2014
thanks i'll check it out now
Re : [URGENT] How can i make AdmWarnings when someone uses /rcon say -
D3vin - 05.05.2014
Still not working i GMX'd and relogged , still same , didn't get a warning when i did /rcon say Hi
Re: [URGENT] How can i make AdmWarnings when someone uses /rcon say -
Eth - 05.05.2014
where is the error line?
edit oh, sorry my bad:
pawn Код:
if(strcmp(cmd, "safegmx", true) == 0)
{
if(!IsPlayerAdmin(sendername)) return SendClientMessage(playerid,-1,"You are not admin to use this command");
GameModeInitExitFunc();
return 1;
}
Re : [URGENT] How can i make AdmWarnings when someone uses /rcon say -
D3vin - 05.05.2014
undefined playerid
after idefined it i had Prototype error or some shit like that
Re: [URGENT] How can i make AdmWarnings when someone uses /rcon say -
Eth - 05.05.2014
pawn Код:
if(strcmp(cmd, "safegmx", true) == 0)
{
if(!IsPlayerAdmin(sendername)) return SendClientMessage(playerid,-1,"You are not admin to use this command");
GameModeInitExitFunc();
return 1;
}
Re : [URGENT] How can i make AdmWarnings when someone uses /rcon say -
D3vin - 05.05.2014
C:\Documents and Settings\Administrateur\Bureau\SA-MRP - v0.3z (V2)\gamemodes\SA-MRP.pwn(64582) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Administrateur\Bureau\SA-MRP - v0.3z (V2)\gamemodes\SA-MRP.pwn(64582) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administrateur\Bureau\SA-MRP - v0.3z (V2)\gamemodes\SA-MRP.pwn(6458

: error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Administrateur\Bureau\SA-MRP - v0.3z (V2)\gamemodes\SA-MRP.pwn(6458

: error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: [URGENT] How can i make AdmWarnings when someone uses /rcon say -
Eth - 05.05.2014
pawn Код:
public OnRconCommand(cmd[])
{
if(strcmp(cmd, "safegmx", true) == 0)
{
if(IsPlayerAdmin(sendername) == 0)) return SendClientMessage(playerid,-1,"You are not admin to use this command");
GameModeInitExitFunc();
return 1;
}
if(strcmp(cmd, "say", true) == 0)
{
if(IsPlayerAdmin(sendername) == 0)) return SendClientMessage(playerid,-1,"You are not admin to use this command");
format(string, sizeof(string), "{FF0000}AdmWarning{FFFF00}: %s is using Rcon SAY to chat" .",sendername);
ABroadCast(COLOR_WHITE,string,100001);
return 1;
}
return 0;
}
Re: [URGENT] How can i make AdmWarnings when someone uses /rcon say -
Konstantinos - 05.05.2014
OnRconCommand has only one parameter and that's "cmd". "playerid" is indeed undefined so you cannot use SendClientMessage function there as it requires a player's ID.
Also:
Quote:
Important note: You will need to include this callback in a loaded filterscript for it to work in the gamemode!
|