24.01.2012, 22:11
Use a include do los й bem facil de usar, ficaria +/- assim
baixe a include nesse topico: https://sampforum.blast.hk/showthread.php?tid=293534
e coloque no topo do seu script #include <losgs>
pawn Код:
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
{
GetPlayerName(playerid, nome, sizeof(nome));
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_BRANCO, "USO: /admin [TEXTO]");
return 1;
}
new atext[64];
if(LevelInfo[playerid][Admin] == 1) { atext = "Moderador"; }
else if(LevelInfo[playerid][Admin] == 2) { atext = "Moderador"; }
else if(LevelInfo[playerid][Admin] == 3) { atext = "Administrador"; }
else if(LevelInfo[playerid][Admin] == 4) { atext = "Scripter/Mapper"; }
else if(LevelInfo[playerid][Admin] == 5) { atext = "Dono"; }
else { atext = ""; }
format(string,sizeof(string),"Admin %s %s: %s",atext, nome, result);
SendMessageToAdmins(COLOR_ADMIN,string);
CriarLog("Logs.log");
new celulas[50];
format(celulas, sizeof(celulas), "Admin %s %s: %s",atext, nome, result);
EscreverLog("Logs.log", celulas);
return 1;
}
e coloque no topo do seu script #include <losgs>