29.01.2015, 04:54
Код:
CMD:ban(playerid, params[]) { if(PlayerInfo[playerid][Admin] >= 3){ if(sscanf(params,"us[158]",ID,Texto)) { SendClientMessage(playerid,-1,"{FF0000}< Erro > {C3C3C3}USO: /ban [id] [motivo]"); } else { if(!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,"{FF0000}< Erro > {C3C3C3} Jogador nгo Conectado!"); if(Owner[ID] == true) return 0; GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME); GetPlayerName(ID,NomeID,MAX_PLAYER_NAME); GetPlayerIp(ID, plrIP, sizeof(plrIP)); SetTimerEx("BanPlayer", 100, false, "d", ID); MensagemAdminCMD(pNome(playerid), "Banir"); new File:SaveBan = fopen("/Banidos.txt", io_append); gettime(Horas,Minutos,Segundos); getdate(Ano,Mes,Dia); format(CBDStr, sizeof(CBDStr),"***Administrador '%s' Baniu '%s' (Motivo: %s ) [Data: %d/%d/%d] [Hora: %d:%02d:%02d]",NomeP,NomeID,Texto,Dia,Mes,Ano,Horas,Minutos,Segundos); SendClientMessageToAll(cinza,CBDStr); PlayerInfo[playerid][Banido] = 1; format(CBDStr, sizeof CBDStr,"Admin: %s\nMotivo: %s\nData: %d/%d/%d\nHora: %d:%02d:%02d",Nome(playerid),Texto,Dia,Mes,Ano,Horas,Minutos,Segundos); fwrite(SaveBan, String); fclose(SaveBan); ShowPlayerDialog(ID,122,DIALOG_STYLE_MSGBOX,"Banido Do Servidor!",CBDStr,"Sair",""); Kick(ID); } } else SendClientMessage(playerid,-1,"{FF0000}< Erro > {C3C3C3} Vocк precisa ser Administrador para usar esse Comando!"); return 1; }
Код:
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\gamemodes\CBD.pwn(3622) : error 017: undefined symbol "plrIP" C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\gamemodes\CBD.pwn(3622) : error 017: undefined symbol "plrIP" C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\gamemodes\CBD.pwn(3622) : error 029: invalid expression, assumed zero C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\gamemodes\CBD.pwn(3622) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.