06.12.2016, 03:30
Galera peguei um gamemode e esse codigo tava com /* por mim era sу tirar e compilar pra funfa nй mais nгo funfo, deu erros... falta sу isso pra funfar os comandos de admin. Alguem pode me ajudar? estou aprendendo a mexer. se possivel me derem algumas dicas agradeзo!!!
(5057) : error 017: undefined symbol "SendAdminText"
(5071) : error 017: undefined symbol "PlayerLevel"
(5077) : error 017: undefined symbol "PlayerLevel"
(5083) : error 017: undefined symbol "AdminLevelName"
(5083) : warning 217: loose indentation
(5083) : warning 215: expression has no effect
(5083) : error 001: expected token: ";", but found "]"
(5083) : error 029: invalid expression, assumed zero
(5083) : fatal error 107: too many error messages on one line
(5057) : error 017: undefined symbol "SendAdminText"
(5071) : error 017: undefined symbol "PlayerLevel"
(5077) : error 017: undefined symbol "PlayerLevel"
(5083) : error 017: undefined symbol "AdminLevelName"
(5083) : warning 217: loose indentation
(5083) : warning 215: expression has no effect
(5083) : error 001: expected token: ";", but found "]"
(5083) : error 029: invalid expression, assumed zero
(5083) : fatal error 107: too many error messages on one line
PHP код:
CMD:sbcsetlevel1(playerid, params[])
{
if (APlayerData[playerid][LoggedIn] != true) return SendClientMessage(playerid, -1, "{FFFF00}[ERRO] {009D4F}Vocк nгo estб logado!");
// Setup local variables
new OtherPlayer, Level, Msg[128], Name[24], AdminName[24], OldLevel;
// Send the command to all admins so they can see it
SendAdminText(playerid, "/setlevel", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 5
if(CallRemoteFunction("PegarLevelNovo","i",playerid) < 2) return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: Vocк nгo tem permissгo para isso!");
if (sscanf(params, "ui", OtherPlayer, Level)) SendClientMessage(playerid, 0xFF0000AA, "Use: \"/setlevel <ID> <AdminLevel>\"");
else
{
// Check if that other player is online
if (IsPlayerConnected(OtherPlayer))
{
// Get the old level of the other player
OldLevel = APlayerData[OtherPlayer][PlayerLevel];
// Get the playername of the admin
GetPlayerName(playerid, AdminName, sizeof(AdminName));
// Also get the name of the player that has been promoted
GetPlayerName(OtherPlayer, Name, sizeof(Name));
// Store the level of the player
APlayerData[OtherPlayer][PlayerLevel] = Level;
// Let all players know about it
if (OldLevel != Level)
{
// Check if the player has been promoted or demoted
if (OldLevel < Level)
format(Msg, 128, "{FFFF00}[INFO] {009D4F}Player %s foi promovido a %s por %s", Name, AdminLevelName[Level], AdminName);
if (OldLevel > Level)
format(Msg, 128, "{FFFF00}[INFO] {009D4F}Player %s foi rebaixado por %s por %s", Name, AdminLevelName[Level], AdminName);
SendClientMessageToAll(0x00FF00FF, Msg);
WriteLog("SetLevel.log", Msg);
}
else
SendClientMessage(playerid, 0xFF0000FF, "{FFFF00}[ERRO] {009D4F}Nнvel de outros jogadores nгo foi alterado");
}
else
SendClientMessage(playerid, 0xFF0000FF, "{FFFF00}[ERRO] {009D4F}Jogador offline");
}
}
else
return 0;
return 1;