IRCCMD:admins(botid, channel[], user[], host[], params[])
{
new str[100],name[24];
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && adminlevel[i] > 1)
{
GetPlayerName(i,name,sizeof name);
format(str,sizeof str,"0,3Admin %s (ID:%d) (Level %d)",name,i,adminlevel[i]);
IRC_Say(IRC_EchoConnection[0],channel,str);
}
}
return 1;
}
For the first thing:
Use SendClientMessage... Second: We can't convert when we do not know the code. Third: Search |
if(strcmp("/apm", cmdtext, 4) == 0)
{
new tmp, tmp2, idx, string;
tmp = strtok(cmdtext[5], idx);
tmp2 = strtok(cmdtext[7], idx);
if((!strlen(tmp)) || (!strlen(tmp2)))
{
SendClientMessage(playerid, {your color}, "USAGE: /apm [playerid] [message]");
}
else
{
format(string, sizeof(string), "ID %d: Admin says: %s", tmp, tmp2);
SendClientMessage(tmp, {your color}, string);
}
return 1;
}
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(91) : warning 213: tag mismatch
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(94) : error 017: undefined symbol "strtok"
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(95) : error 017: undefined symbol "strtok"
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(96) : error 035: argument type mismatch (argument 1)
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(98) : error 017: undefined symbol "your"
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(98) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(98) : warning 215: expression has no effect
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(98) : error 001: expected token: ";", but found ")"
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\gamemodes\Untitled.pwn(98) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.
CMD:pm(playerid, params[])
{
new PID, pName[MAX_PLAYER_NAME];
if(sscanf(params, "us[128]", PID, params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /pm [playerid] [message]");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
new Str[128];
GetPlayerName(PID, pName, sizeof(pName));
format(Str, sizeof(Str), "Admin says: %s", Sender, params);
SendClientMessage(PID, COLOR_WHITE, Str);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
}
return 1;
}