/helme 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)
+--- Thread: /helme command (
/showthread.php?tid=370913)
/helme command -
kbalor - 21.08.2012
Anyone has a command like this
if /helme [Message] send message to online administrators..
example: /helpme what is the script for this?
SendMessageToAdmin... "You're message has been send to online administrators"
If send, then show only to online administrators "[HELP][Playername][ID]: "what is the script for this?"
Re: /helme command -
UnknownGamer - 21.08.2012
Basically "/atalk"?
Re: /helme command -
[MWR]Blood - 21.08.2012
Run a loop through all the players, detect who of them is an admin, and send them the message.
Something like
pawn Код:
function SendAdminMessage(color,const str[])
{
foreach(Player,i)
{
if(PInfo[i][Level] > 0)
{
SendClientMessage(i,color,str);
}
}
return 1;
}
Using foreach.
Re: /helme command -
kbalor - 21.08.2012
Quote:
Originally Posted by UnknownGamer
Basically "/atalk"?
|
Yeah atalk is admin to admin, I need player to admin.
Re: /helme command -
kbalor - 21.08.2012
Quote:
Originally Posted by [MWR]Blood
Run a loop through all the players, detect who of them is an admin, and send them the message.
Something like
pawn Код:
function SendAdminMessage(color,const str[]) { foreach(Player,i) { if(PInfo[i][Level] > 0) { SendClientMessage(i,color,str); } } return 1; }
Using foreach.
|
Don't know much about this. is there any easiest way like this below..
pawn Код:
CMD:helpme(playerid, params[])
{
if ( isnull ( params ) ) return SendClientMessage(playerid, COLOR_YELLOW, #Syntax Usage: /helpme [message] );
new
_msg[ 128 ],
player_name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, player_name, MAX_PLAYER_NAME );
format( _msg, sizeof ( _msg ), "%s Bug reported: %s\r\n", player_name, params );
new File: fileToWrite = fopen("help.txt", io_append);
fwrite(fileToWrite, _msg);
fclose(fileToWrite);
return 1;
}
But without saving it.. Also It must have a tag [HELP] before the name and Id.
Like this [HELP][Booger][7]: Thanks for your reply Appreciate!
Re: /helme command -
Lordzy - 21.08.2012
Can you edit your pawn tags well and post?