Jump to content
  • 0

Error


armando112

Question

[pawn][/pawn]D:\samp\server vechi\pawno\include\PPC_PlayerCommands.inc(2203) : error 021: symbol already defined: "cmd_setlevel"

si linia:[pawn][/pawn]// Sets the admin-level of another player

COMMAND:setlevel(playerid, params[])

{

// 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 rcon

if (APlayerData[playerid][PlayerLevel] >= 8)

{

if (sscanf(params, "ui", OtherPlayer, Level)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/setlevel <OtherPlayer> <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, "Player %s has been promoted to %s by %s", Name, AdminLevelName[Level], AdminName);

if (OldLevel > Level)

format(Msg, 128, "Player %s has been demoted to %s by %s", Name, AdminLevelName[Level], AdminName);

SendClientMessageToAll(0x00FF00FF, Msg);

}

else

SendClientMessage(playerid, 0xFF0000FF, "Other player's level hasn't been changed");

}

else

    SendClientMessage(playerid, 0xFF0000FF, "Acest Utilizator nu este Oline");

}

}

else

    return 0;

}

else

    return 0;

// Let the server know that this was a valid command

return 1;

}

serverul e pe include:!!!!!

y/m:

armando.jupanu

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.