Ahah but now I have another issue. The script compiles fine but
06:56:21] <~[TT]TrueCoppa> !setscore 1 1
[06:56:22] <&TTCNR2> 2ERROR: 48 is not an active ID.
[06:56:25] <~[TT]TrueCoppa> wat
[06:56:33] <~[TT]TrueCoppa> !setscore 0 1
[06:56:34] <&TTCNR1> 2ERROR: 48 is not an active ID.
No matter what I do it just does ID 48.
pawn Код:
IRCCMD:setscore(botid, channel[], user[], host[], params[])
{
if (IRC_IsOp(botid, channel, user))
{
new setid;
new score;
new string[128];
if(sscanf(params, "us[100]", setid, score))
{
format(string, sizeof(string), "USAGE: !setscore (ID) (Score)");
Say(channel,string);
return 1;
}
if(!IsPlayerConnected(setid))
{
format(string, sizeof(string), "2ERROR: \2;%d\2; is not an active ID.", setid);
Say(channel,string);
return 1;
}
format(string, sizeof(string), "You have successfully set %s(%d)'s score to %s",PlayerName(setid),setid,score);
Say(channel,string);
SetPlayerScore(setid,score);
dUserSetINT(PlayerName(setid)).("Score", score);
format(string, sizeof(string), "[SCORE SET] Your score has been set to %d by an administrator.",score);
SendClientMessage(setid,COLOR_ADMIN,string);
return 1;
}
return 1;
}