/REP Command problem [+reps]
#1

Hello, I'v rep command in my server, but the problem that , for example if we have 3 players

Alex (ID 0)
Strike (ID 1)
SPA (ID 2)

If player 'SPA (ID 3 ) ' type /rep 1 (which meaning ) 'strike' its return the rep to the id 0 'Alex' , but its show in msgs that it's returned to id 1'Strike' , why is that happen?

CODE
Код:
CMD:rep(playerid,params[])
{

    static IDD, amount, name[MAX_PLAYERS], string7[200], name2[MAX_PLAYERS], string8[200];
    if (sscanf(params, "ii", IDD,amount)) return SendClientMessage(playerid, 0xff0000aa, "* Usage: /rep [playerid/name] [amount]");
    if (amount > GetPlayerScore(playerid)) return SendClientMessage(playerid, 0xff0000aa, "* You do not have enough reps to give reps to player!");
    if (amount <= 0) return SendClientMessage(playerid, 0xff0000aa, "* You can't rep less than 1!");
    if (playerid == IDD) return SendClientMessage(playerid, 0xff0000aa, "* You can't rep yourselve!");
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(IDD, name2, sizeof(name2));
    format(string8,sizeof(string8),"[REP INFO] {FFAF00}%s recieved %i reps from %s",name2,amount,name);
    SendClientMessageToAll(COLOR_RED,string8);

    format(string8, sizeof(string8), "3,1[REP INFO] {FFAF00}%s recieved %i reps from %s",name2,amount,name);
	IRC_GroupSay(groupID, IRC_CHANNEL, string8);

    format(string7,sizeof(string7),"{FFFF00}* %s(%d) Has rep for you: %i",name,playerid,amount);
    SendClientMessage(ID,COLOR_RED,string7);
    SetPlayerScore(playerid, GetPlayerScore(playerid) -amount);
    //SetPlayerScore(ID,amount);
    SetPlayerScore(ID, GetPlayerScore(ID) +amount);
    return 1;
}
Reply


Messages In This Thread
/REP Command problem [+reps] - by SPA - 19.09.2014, 13:32
Re: /REP Command problem [+reps] - by Blast3r - 19.09.2014, 13:55
Re: /REP Command problem [+reps] - by Blast3r - 19.09.2014, 13:59
Re: /REP Command problem [+reps] - by SPA - 19.09.2014, 15:55
AW: /REP Command problem [+reps] - by Mellnik - 19.09.2014, 16:05
Re: /REP Command problem [+reps] - by SPA - 19.09.2014, 16:41
Re: /REP Command problem [+reps] - by Eth - 19.09.2014, 16:42
Re: /REP Command problem [+reps] - by Stinged - 19.09.2014, 16:44
Re: /REP Command problem [+reps] - by Eth - 19.09.2014, 16:45
Re: /REP Command problem [+reps] - by SPA - 19.09.2014, 17:07

Forum Jump:


Users browsing this thread: 1 Guest(s)