How to give reputation?
#3

Im want if clicked on player show info and two buttons: +REP and Exit

This code i have:

Код:
ShowPlayerDialog        ( playerid, 200, DIALOG_STYLE_MSGBOX, "{FFFFFF}Info", msg, "+REP", "Exit" );
But im created rep system i bugged:

Код:
else if(dialogid == 200)
    {
        if(!response)
        {

        }
        if(response)
        {
            new targetid;
            if( targetid == playerid ) return SendClientMessage( playerid, COLOR_RED, "you can not give yourself" );
            if(PlayerData[playerid][RepTime] > 1)
            {
                SendClientMessage(playerid, COLOR_RED, "1 reputation every 1 minute ");
            }
            else
            {
                
                new z[128];
                new x[128];
                new name[MAX_PLAYER_NAME];
                new targetname[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, MAX_PLAYER_NAME);
                GetPlayerName(playerid, targetname, MAX_PLAYER_NAME);
                format(z, sizeof(z), "yOU got 1 rep from %s", name);
                SendClientMessage(targetid, -1, z);
                format(x, sizeof(x), "Send 1 rep for %s", targetname);   
                SendClientMessage(playerid, -1, x);
                PlayerData[targetid][Rep] += 1;
                PlayerData[playerid][RepTime] = 1;

            }
        }
        return 1;
    }
if clicked on other player not me and click +R3P:
have error:

you can not give yourself
Reply


Messages In This Thread
How to give reputation? - by TheNerka - 15.10.2014, 17:25
Re: How to give reputation? - by HY - 15.10.2014, 18:02
Re: How to give reputation? - by TheNerka - 15.10.2014, 18:54
Re: How to give reputation? - by Threshold - 16.10.2014, 00:38

Forum Jump:


Users browsing this thread: 1 Guest(s)