Sever Lock - 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: Sever Lock (
/showthread.php?tid=415152)
Sever Lock -
DerickClark - 12.02.2013
Код:
C:\pawno\include\PPC_PlayerCommands.inc(5110) : error 017: undefined symbol "ServerInfo"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5110) : error 017: undefined symbol "Locked"
C:\Users\pawno\include\PPC_PlayerCommands.inc(5110) : error 029: invalid expression, assumed zero
C:\Users\pawno\include\PPC_PlayerCommands.inc(5110) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Код:
COMMAND:locksever(playerid, params[])
{
new string[156];
if (APlayerData[playerid][PlayerLevel] >= 4)
{
if(ServerInfo[Locked] == 0)
{
if(!strlen(params)) return
SendClientMessage(playerid, 0xFF0000AA, "Usage: /lockserver [Password]") &&
SendClientMessage(playerid, 0xFF0000AA, "Command: Will server lock with specified Password");
strmid(ServerInfo[Password], params[0], 0, strlen(params[0]), 128);
format(string, 128, "Server Password: %s ", params);
return ShowPlayerDialog(playerid, DIALOG_TYPE_SERVLOCK, DIALOG_STYLE_MSGBOX, "Lock/Unlock Server", string, "Yes", "No");
}
else return SendClientMessage(playerid,0xFF0000AA,"ERROR: Server is Locked!");
}
else return ErrorMessages(playerid, 1);
}
Re: Sever Lock -
MP2 - 12.02.2013
You haven't declared the 'ServerInfo' enum/array. Wherever you copied and pasted this from, you need that also.
Re: Sever Lock -
DerickClark - 12.02.2013
Nvm i got a new one but how to do dis /locksever [password]
Here my code
Код:
COMMAND:locksever(playerid, params[])
{
if (APlayerData[playerid][PlayerLevel] >= 7)
#pragma unused params, playerid
SendClientMessage(playerid, 0xFF0000AA, "you have put a sever lock.");
SendRconCommand("password testing");
return 1;
}