Jump to content

Question

Posted

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

Posted

de la versiunea 0.3x sa scos faza de le dadea mesaj ca a fost banat sau ca a luat kick

cred ca daca definesti

[pawn]

#define Kick(%1) SetTimerEx ( "Kick_Ban", 500, false, "ii", %1, false )

#define Ban(%1) SetTimerEx ( "Kick_Ban", 500, false, "ii", %1, true )

[/pawn]

ar trebui sa iti apara

daca nu apare mareste timpu {500} cu 1000 sau mai mult

 

 

430x73_FFFFFF_FF9900_000000_000000.png

 
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.