- 0
Nu apare motivu la ban
-
Similar Content
-
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
VinDiesel
Salut ,am probleme cu scriptu de banare sau kick .. la playeri nu le apare motivu ,durata sau tipul banului , daca sar putea sami ziceti unde este eroare sau alt script mai bun ? Multumesc mult
[pawn]
// Bans a player by his ip
COMMAND:ipban(playerid, params[])
{
// Setup local variables
new PlayerToBan, Reason[128], Msg[128], Name[24], AdminName[24];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/ipban", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 3)
{
if (sscanf(params, "us[128]", PlayerToBan, Reason))
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ipban <PlayerToBan> <Reason>\"");
else
{
if (IsPlayerConnected(PlayerToBan))
{
// Get the names of the player and the admin who executed the ban
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(PlayerToBan, Name, sizeof(Name));
// Inform the player about his ban
format(Msg, 128, "{FF0000}Ai fost banat permanent de : {FFFF00}%s", AdminName);
SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg);
format(Msg, 128, "{FF0000}Reason: {FFFF00}%s", Reason);
SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg);
// Ban the player with a reason
BanEx(PlayerToBan, Reason);
// Inform everybody else which player was ip-banned
format(Msg, 128, "{808080}%s %s has ip-banned {FFFF00}%s", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name);
SendClientMessageToAll(0xFFFFFFFF, Msg);
}
}
}
else
return 0;
}
else
return 0;
return 1;[/pawn]
2 answers to this question
Recommended Posts