03.12.2010, 02:13
Is there a command that locks the server? Or how do i code one? I want it so i say /lock as a rcon admin and the server locks until restarted.
public OnPlayerConnect(playerid)
{
if(serverstat==0)
{
Kick(playerid);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lockserver", cmdtext, true, 10) == 0)
{
if(serverstat==1)
{
SendClientMessage(playerid, 0xFF0000, "Server Un-Locked...");
serverstat=0;
}else{
SendClientMessage(playerid, 0xFF0000, "Server Locked...");
serverstat=1;
}
return 1;
}
return 0;
}