How to make this 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: How to make this command (
/showthread.php?tid=69754)
How to make this command -
KurtKill - 20.03.2009
Well i need help making a command called like /admint
and when a level 3+ admin does it a message comes up like this to all players
lets say admin does
/admint Guys server will restart
it will show up like this
Admin Name Says: Guys server will restart
please help
Re: How to make this command -
brett7 - 20.03.2009
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/admint", cmdtext, true, 7) == 0)
{
new PlayerName[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(str, sizeof(str), "* admin %s(%d) has restarted the server!", PlayerName, playerid);
SendClientMessageToAll(colour, str);
return 1;
}
return 0;
}
now just add a check for what level the player is and maybe set a timer to restart the server and that should work nicely
Re: How to make this command -
KurtKill - 20.03.2009
Thanks but i was getting at like the admin can type what ever they want
Re: How to make this command -
MenaceX^ - 20.03.2009
How you define your admin's level?
Re: How to make this command -
Rks25 - 20.03.2009
colour should be COLOUR.
Re: How to make this command -
brett7 - 20.03.2009
Quote:
Originally Posted by Rks_
colour should be COLOUR.
|
i don't think it really matters
Re: How to make this command -
MenaceX^ - 20.03.2009
Quote:
Originally Posted by Rks_
colour should be COLOUR.
|
Huh? You're kidding right?
It depends how he defined it.
Re: How to make this command -
Rks25 - 20.03.2009
i just said the way i am used to things.
Re: How to make this command -
KurtKill - 21.03.2009
That command gave me errors!
Re: How to make this command -
brett7 - 21.03.2009
Quote:
Originally Posted by WarLord
That command gave me errors!
|
what errors did you get?