29.08.2012, 23:12
pawn Код:
if(strcmp(cmdtext, "/banir", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(IsPlayerAdmin(playerid)){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "Digite: /banir [id] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(IsPlayerConnected(plid)){
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, Vermelho, "Digite: /banir [id] [motivo]");
}else{
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "[INFO] %s baniu o jogador: %s | Motivo: %s | %d-%d-%d", aname, pname,result,month,day,year);
BanLog(string);
SendClientMessage(plid, tcadm, "{FFFF00}Vocк foi banido injustamente? Entre em nosso fуrum e denъncie:");
GameTextForPlayer(plid,"~r~Banido", 2500, 3);
format(string, sizeof(string), "{FFFF00}[INFO] O Administrador %s baniu o jogador: %s | Motivo: %s", aname,pname,result);
SendClientMessageToAll(tcadm, string);
dini_IntSet("banidos.ini",pname,1);
Ban(plid);
}
}else{
format(string, sizeof(string), "[ERRO] Jogador nгo conectado!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
pawn Код:
error 017: undefined symbol "file"
error 017: undefined symbol "file"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Serб que falta alguma include



