D:\A L.H Server\gamemodes\LosHermanos.pwn(45062) : error 017: undefined symbol "id"
SendClientMessage(playerid, 0x33CCFFAA, "| PuniзгoOff | Conta punida com sucesso!");
SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result);
WE_SetInt(gFile, "Abuser", 1);
WE_SetInt(gFile, "Preso", iTempo*60);
SendClientFormat(id, COR_VERDE, "{57FF03}| PUNIЗГO | Vocк foi preso por %d Minutos", iTempo);
SendClientFormat(playerid, COR_ERRO, "{57FF03}| INFO | Vocк prendeu o(a) jogador(a) %s por %d Minutos", PlayerName(id), iTempo);
SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Administrador(a) %s prendeu o(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result);
format(gFile, sizeof(gFile), "Contas/%s.ini", PlayerName(id));
WE_SetInt(gFile, "Abuser", 1);
SendClientFormat(playerid, COR_VERDE, "{57FF03}| PUNIЗГO | Vocк foi preso por %d Minutos", iTempo);
SendClientFormat(playerid, COR_ERRO, "{57FF03}| INFO | Vocк prendeu o(a) jogador(a) %s por %d Minutos", PlayerName(id), iTempo);
SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Administrador(a) %s prendeu o(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result);
format(gFile, sizeof(gFile), "Contas/%s.ini", PlayerName(id));
WE_SetInt(gFile, "Abuser", 1);
|
Код:
SendClientFormat(playerid, COR_VERDE, "{57FF03}| PUNIЗГO | Vocк foi preso por %d Minutos", iTempo);
SendClientFormat(playerid, COR_ERRO, "{57FF03}| INFO | Vocк prendeu o(a) jogador(a) %s por %d Minutos", PlayerName(id), iTempo);
SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Administrador(a) %s prendeu o(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result);
format(gFile, sizeof(gFile), "Contas/%s.ini", PlayerName(id));
WE_SetInt(gFile, "Abuser", 1);
|
SendClientMessage(playerid, 0x33CCFFAA, "| PuniзгoOff | Conta punida com sucesso!");
SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result);
WE_SetInt(gFile, "Abuser", 1);
WE_SetInt(gFile, "Preso", iTempo*60);
|
Man esse й como eu queria que ficasse, ou seja, o que eu peguei de exemplo. O que esta dando erro й esse:
PHP код:
|
new id;
|
Mas tem como eu trocar a variavel id > para a acc que foi punida ?
Por que tipo o comando й /prenderoff [Conta] |
if(!strcmp(cmd, "/aprenderoff", true))
{
if(aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1 && aInfo[playerid][SubStaff] = 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COR_ERRO, "Uso vбlido: correto /aPrenderOFF [Nick] [Tempo] [Motivo]");
return 1;
}
format(gFile, sizeof(gFile), "Contas/%s.ini", tmp);
if(!fexist(gFile))
{
SendClientMessage(playerid, COR_ERRO, "Nгo existe nenhuma conta com esse nick!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(! strlen(tmp))
{
SendClientMessage(playerid, COR_ERRO, "Uso vбlido: /aPrenderOFF [Nick] [Tempo] [Motivo]");
return 1;
}
new
iTempo = strval(tmp)
;
if(iTempo < 1 || iTempo > 600)
{
SendClientMessage(playerid, COR_ERRO, "Tempo somente de 1 а 600 minutos ! ");
return 1;
}
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, COR_ERRO, "Uso vбlido: /aPrenderOFF [Nick] [Tempo] [Motivo]");
return 1;
}
SendClientMessage(playerid, 0x33CCFFAA, "| PuniзгoOff | Conta punida com sucesso!");
SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result);
WE_SetInt(gFile, "Abuser", 1);
WE_SetInt(gFile, "Preso", iTempo*60);
}
else
{
SendClientMessage(playerid, COR_ERRO, "Vocк nгo tem permissгo!");
}
return 1;
}
if(!strcmp(cmd, "/aprenderoff", true))
{
if(aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1 && aInfo[playerid][SubStaff] = 1)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
new tmp[256], tmp2[256], tmp3[256], idx;
tmp = strtok(params, idx);
tmp2 = strtok(params, idx);
tmp3 = strtok2(params, idx);
if(!strlen(tmp)||!strlen(tmp2)||!strlen(tmp3))
return SendClientMessage(playerid,COR_USOCORRETO,"Uso: /agendarcadeia [nick] [minutos] [motivo]");
if(strval(tmp2) > 600)
return SendClientMessage(playerid, COR_ERRO, "ERRO: O mбximo de minutos й 600!");
if(strval(tmp2) == 0)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Para soltar alguйm use /soltar [id].");
if(strval(tmp2) < 0)
return SendClientMessage(playerid,COR_USOCORRETO,"Uso: /agendarcadeia [nick] [minutos] [motivo]");
new file[256];
format(file,256,"Presos/%s.ini",tmp);//PASTA ONDE A OS PLAYERS FICAM PRESOS ..
DOF2_CreateFile(file);
DOF2_SetInt(file,"Minutos", strval(tmp2));
DOF2_SetString(file,"AdminName", getPName(playerid));
DOF2_SetString(file,"Motivo", tmp3);
DOF2_SaveFile();
SendClientFormatAll(playerid, COR_PRINCIPAL, "» Vocк agendou a prisгo de '%s', '%d' minutos, motivo de: '%s'", tmp, strval(tmp2), tmp3);
return 1;
}
|
Espero ter ajudado.
PHP код:
|
SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result);