- 0
Problema ladmin
-
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
Alpha1997
Am rezolvat ultimele 2 erori si mi-au aparut altelte:
Linia 790:
[pawn]
for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { OnPlayerConnect(i); } return 1; }[/pawn]
Linia 1501:
[pawn]
return OnPlayerConnect(player1);[/pawn]
Linia 1501 este de la comanda /setname.
Comanda setname:
[pawn]
dcmd_setname(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 7 || IsPlayerAdmin(playerid)) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setname [playerid] [new name]");
new player1 = strval(tmp), length = strlen(tmp2), string[128];
if(length < 3 || length > MAX_PLAYER_NAME) return SendClientMessage(playerid,red,"ERROR: Incorrect Name Length");
if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
CMDMessageToAdmins(playerid,"SETNAME");
format(string, sizeof(string), "{FFFFFF}You have set \"{F81414}%s{FFFFFF}'s\" name to \"{F81414}%s\" ", pName(player1), tmp2); SendClientMessage(playerid,blue,string);
if(player1 != playerid) { format(string,sizeof(string),"{0049FF}Administrator {F81414}%s {FFFFFF}has set your name to {F81414}%s ", pName(playerid), tmp2); SendClientMessage(player1,blue,string); }
SetPlayerName(player1, tmp2);
return OnPlayerConnect(player1);
} else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}[/pawn]
Multumesc anticipat.
1 answer to this question
Recommended Posts