restart server - 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: restart server (
/showthread.php?tid=255796)
restart server -
Join7 - 17.05.2011
By restarting the server through the command /gmx, filterscripts removed
Код:
if(strcmp(cmd, "/gmx", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
GameModeExit();
}
}
return 1;
}
Re: restart server -
jNkk - 17.05.2011
Is this a tutorial or what?
Really I don't know what's the problem/what you meant but
look here a better idea of this script :
pawn Код:
if(strcmp(cmd, "/gmx", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SendRconCommand(gmx);
}
else SendClientMessage(playerid,anycolor,"you are not an admin!");
}
return 1;
}
*NOT TESTED*
-jNkk
Re: restart server -
xDeadlyBoy - 17.05.2011
wrong:
pawn Код:
if(strcmp(cmd, "/gmx", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SendRconCommand("gmx");
}
else SendClientMessage(playerid,anycolor,"you are not an admin!");
}
return 1;
}
Re: restart server -
jNkk - 17.05.2011
Yeap xDeadlyBoy , thanks for correcting me, I was sure I
didn't write ok on that line , I also learnt something new xD
-jNkk
Re: restart server -
Seven_of_Nine - 17.05.2011
Umm, what do you check by the playerid?
IsPlayerConnected? Omgf if you type this command, you are connected.
I don't really see the point.
And I think "cmd" is "cmdtext".
Have fun.