15.10.2014, 18:54
Im want if clicked on player show info and two buttons: +REP and Exit
This code i have:
But im created rep system i bugged:
if clicked on other player not me and click +R3P:
have error:
you can not give yourself
This code i have:
Код:
ShowPlayerDialog ( playerid, 200, DIALOG_STYLE_MSGBOX, "{FFFFFF}Info", msg, "+REP", "Exit" );
Код:
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; }
have error:
you can not give yourself