SA-MP Forums Archive
Admin Chat - Lux Admin - 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)
+--- Thread: Admin Chat - Lux Admin (/showthread.php?tid=285882)



Admin Chat - Lux Admin - FrostDoggy - 25.09.2011

Well ' Ill be fast

It looks like this

pawn Код:
if(text[0] == '#' && AccInfo[playerid][Level] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
        MessageToAdmins(green,string);
        #if ADM_CHAT_LOG == true
        SaveIn("AdmChatLog",string);
        #endif
        return 0;
    }
And to use it is

# Test

With "#" in front.

I tried but I couldn't to replace # with /ac.

Thanks in advance for who knows.


Re: Admin Chat - Lux Admin - [WoF]Sonny - 25.09.2011

Try this

Quote:

dcmd_ac(playerid,params[])
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
MessageToAdmins(green,string);
#if ADM_CHAT_LOG == true
SaveIn("AdmChatLog",string);
#endif
return 0;
}

dont forget to set level


Re: Admin Chat - Lux Admin - IstuntmanI - 25.09.2011

Quote:
Originally Posted by [WoF]Sonny
Посмотреть сообщение
Try this



dont forget to set level
Fail.

Код:
dcmd_ac( playerid, params[ ] )
{
	if( AccInfo[ playerid ][ Level ] == 0 )
		return SendClientMessage( playerid, -1, "ERROR: You are not administrator level 1+ !" );

	new string[ 128 ]; 
	GetPlayerName( playerid, string, 128 );
	format( string, 128, "Admin Chat: %s: %s", string, params );
	MessageToAdmins( green, string );
	#if ADM_CHAT_LOG == true
	SaveIn( "AdmChatLog", string );
	#endif
	return 1;
}



Re: Admin Chat - Lux Admin - [WoF]Sonny - 25.09.2011

Fail.


I bet he can without your "help" man