ifScore
#2

PlayerScore is always 0, use GetPlayerScore instead. You used if the score is lesser or equal to 15 to be accepted when you wanted the opposite. Also use another dialogid, don't use the ID of the pickup for it.

pawn Код:
#include <a_samp>

new pickupas;

public OnGameModeInit()
{
    pickupas = CreatePickup(1314, 2, 2026.5564, 1344.3346, 10.8203, -1);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickupas) ShowPlayerDialog(playerid, 412, DIALOG_STYLE_LIST, "{FFFFFF}JOB", "{FFFF00}Take Job\n{FFFF00}Leave Job", "OK", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 412:
        {
            if(response && !listitem)
            {
                if(GetPlayerScore(playerid) >= 15) SendClientMessage(playerid, -1, "Accepted");
                else SendClientMessage(playerid, -1, "Need more XP.");
            }
            return 1;
        }
    }
    return 0;
}
Reply


Messages In This Thread
ifScore - by gytiss - 11.11.2013, 17:18
Re: ifScore - by Konstantinos - 11.11.2013, 17:28
Re: ifScore - by Elie1996 - 11.11.2013, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)