09.05.2014, 18:52
Galera eu queria um comando ZCMD de trancar o server.
Tipo o adm digita /ts e seta a senha definida, e quando digita /as tira a senha.
Fiz essa base, mas da erros.
Erros:
Linhas:
Tipo o adm digita /ts e seta a senha definida, e quando digita /as tira a senha.
Fiz essa base, mas da erros.
pawn Код:
COMMAND:ts(playerid, params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 7)
{
new HostCommand[128];
format(HostCommand, 128, "[Closed] NOME DO SERVER ");
SendRconCommand(HostCommand);
SendRconCommand("password chafik");
SendClientMessage(0xFF0000, "Server Trancado com Sucesso!");
return 1;
}
COMMAND:as(playerid, params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 7)
{
new HostCommand[128];
format(HostCommand, 128, "NOME DO SERVER",);
SendRconCommand(HostCommand);
SendRconCommand("0");
SendClientMessage(0x00FF00, "Server Aberto com Sucesso!");
return 1;
}
Erros:
pawn Код:
C:\Users\user\Downloads\pawno\include\PPC_PlayerCommands.inc(2939) : error 035: argument type mismatch (argument 2)
C:\Users\user\Downloads\pawno\include\PPC_PlayerCommands.inc(2940) : error 079: inconsistent return types (array & non-array)
C:\Users\user\Downloads\pawno\include\PPC_PlayerCommands.inc(2942) : warning 217: loose indentation
C:\Users\user\Downloads\pawno\include\PPC_PlayerCommands.inc(2942) : error 029: invalid expression, assumed zero
C:\Users\user\Downloads\pawno\include\PPC_PlayerCommands.inc(2942) : error 017: undefined symbol "cmd_as"
C:\Users\user\Downloads\pawno\include\PPC_PlayerCommands.inc(2942) : error 029: invalid expression, assumed zero
C:\Users\user\Downloads\pawno\include\PPC_PlayerCommands.inc(2942) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
pawn Код:
SendClientMessage(0xFF0000, "Server Trancado com Sucesso!");//2939
return 1;//2940
}//2941
COMMAND:as(playerid, params[])//2942