- 0
[GF/RP] Problema /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
DrakeBusteR
Cum fac ca adminul 1 sa nu poata da ban la adminul 1338?
Sau mai bine zis adminul mic nu poate da ban la un admin mai mare?
Please help.
Uitati aici comanda /ban daca va este de ajutor
if(strcmp(cmd, "/ban", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid/PartOfName] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid/PartOfName] [reason]"); return 1; } new year, month,day; getdate(year, month, day); format(string,128,"AdmCmd: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result), month, day, year); SendClientMessageToAll(COLOR_RED,string); BanLog(string); PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel]; PlayerInfo[giveplayerid][pLevel] = -999; format(string, sizeof(string), "Information: %s was banned by %s, reason: %s\nReclamation: rpgaming.forumz.Ro", giveplayer, sendername, result); ShowPlayerDialog(giveplayerid, 0, DIALOG_STYLE_MSGBOX, "You have been Banned", string, "Ok", "Quit"); Ban(giveplayerid); return 1; } }//not connected } else { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }1 answer to this question
Recommended Posts