27.05.2017, 20:06
Estou criando um dialog porem quando copilo estб dando esses erros.
Dialog no onplayerconnect:
Comando do ban:
pff alguem me ajude! tks!
PHP код:
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(965) : error 027: invalid character constant
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(965) : error 027: invalid character constant
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : error 001: expected token: ";", but found ")"
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : error 029: invalid expression, assumed zero
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
PHP код:
if (dUserINT(PlayerName2(playerid)).("banned") == 1)
{
new GBan[590], S[950], SS[950];
GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~r~CONTA BANIDA!",10000,3);
//SendClientMessageToAll(grey, string); //Mensagem OLD
SendClientMessage(playerid, red, "A conta estб Banida!");
format(S, sizeof(S), "{FFFFFF}Vocк foi {FF0000}banido\Admin responsavel: {FFFFFF}%s\n", dUserINT(PlayerName2(playerid)).("adminb"));
strcat(SS, S);
format(S, sizeof(S), "{FF0000}Motivo: {FFFFFF}%s\n", dUserINT(PlayerName2(playerid)).("motivob"));
strcat(SS, S);
format(S, sizeof(S), "{FF0000}Dia: {FFFFFF}%s\n", dUserINT(PlayerName2(playerid)).("datab"));
strcat(SS, S);
format(S, sizeof(S), "{FF0000}Hora: {FFFFFF}%s\n" dUserINT(PlayerName2(playerid)).("horab")));
strcat(SS, S);
format(S, sizeof(S), "{FF0000}Forum: {FFFFFF}www.seusite.com");
strcat(SS, S);
ShowPlayerDialog(playerid, DIALOG_EBAN, DIALOG_STYLE_MSGOX, "Banimento", SS, "Sair", "");
print(string);
SaveToFile("KickLog",string); Kick(playerid);
}
PHP код:
dcmd_ban(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1)
{
if(PlayerInfo[playerid][Level] >= 2)
{
new tmp[256], tmp2[256], S[900], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "| ERRO |: USE: /ban [playerid] (Motivo)");
if(!strlen(tmp2)) return SendClientMessage(playerid, red, "| ERRO |: Coloque o Motivo!");
new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) )
{
if(PlayerInfo[player1][Level] >= 1 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"| ERRO |: Vocк nгo pode banir um Admin!");
if(!IsNumeric(tmp)) return SendClientMessage(playerid,red,"| ERRO |: ID Invalida");
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day,hour,minuite,second; getdate(year, month, day); gettime(hour,minuite,second);
CMDMessageToAdmins(playerid,"BAN");
format(string,sizeof(string),"| BvD-Admin | O(a) Administrador(a) %s Baniu o(a) Jogador(a) %s (Motivo: %s) ",adminname,playername,params[2],day,month,year,hour,minuite);
SendClientMessageToAll(red,string);
SaveToFile("BanLog",string);
print(string);
if(udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1)
{
dUserSetINT(PlayerName2(player1)).("banned",1);
format(S, sizeof(S), "%s", PlayerName2(playerid));
dUserSetINT(PlayerName2(player1)).("adminb", S);
format(S, sizeof(S), "%02s", params[2]);
dUserSetINT(PlayerName2(player1)).("motivob", S);
format(S, sizeof(S), "%02d/%02d/%02d", day, month, year);
dUserSetINT(PlayerName2(player1)).("datab", S);
format(S, sizeof(S), "%02d:%02d:%02d", hour, minuite, second);
dUserSetINT(PlayerName2(player1)).("horab", S);
}
format(string,sizeof(string),"Banido pelo Administrador %s. (Motivo: %s)", adminname, params[2] );
BanNotify(player1);
SetTimerEx("DelayedBan", 1000, false, "d", player1);
return 1;
}
else return SendClientMessage(playerid, red, "| ERRO |: Jogador(a) nгo Conectado(a)!");
}
else return SendClientMessage(playerid,red,"| ERRO |: O comando digitado nгo Existe!");
}
else return SendClientMessage(playerid,red,"| ERRO |: Voce deve estar logado para usar estes comandos");
}