- 0
Error
-
Similar Content
-
- 1 reply
- 2.000 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
armando112
[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
1 answer to this question
Recommended Posts