Something I just cant get!
#1

Hey everyone, Im trying to do some stuff with my jobs and I cant figure out how to do this.
Iv created a dialog where you choose a job you want to have.
pawn Код:
CMD:joblist(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to login first before using any command.");
    if(!IsPlayerInRangeOfPoint(playerid,2,387.0219,173.7238,1008.3828) && !IsPlayerInRangeOfPoint(playerid,2,1422.5873,-1844.9670,13.5469)) return SendClientMessage(playerid, COLOR_GREY, "You aren't at a job zone.");
    if(PlayerInfo[playerid][pJob] && PlayerInfo[playerid][pVIP] < 2) return SendClientMessage(playerid, COLOR_GREY, "You already have a job.");
    if(PlayerInfo[playerid][pJob] && PlayerInfo[playerid][pVIPJob] && PlayerInfo[playerid][pVIP] >= 2) return SendClientMessage(playerid, COLOR_GREY, "You already have two jobs, /quitjob then try again.");
    if(IsPlayerInRangeOfPoint(playerid,2,387.0219,173.7238,1008.3828)) ShowDialog(playerid, 31);
    else if(IsPlayerInRangeOfPoint(playerid,2,1422.5873,-1844.9670,13.5469)) ShowDialog(playerid, 32);
    return 1;
}
The problem im having is the player is able to have two jobs if they are VIP. I need a way so they cant get the same job twice if they choose a job they arealy have. Here is what happens at the moment if they choose mechanic:
pawn Код:
if(!PlayerInfo[playerid][pJob]) PlayerInfo[playerid][pJob] = JOB_MECHANIC;
                    else if(PlayerInfo[playerid][pVIP] >= 2) PlayerInfo[playerid][pVIPJob] = JOB_MECHANIC;
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have joined the {FF6347}Mechanic {33CCFF}job, type /help to view your job commands.");
I want to make it so If they have no job at all then pJob will be set to mechanic. Otherwise if they do have a job and they arent level 2 VIP then a message saying "you already have a job" or if they are already a mechanic then "you are already a mechanic."
But if they are vip it will check if they have no job in vip slot, etc..
Can someone please help me with this, Id be greatly apreciative!
Reply


Messages In This Thread
Something I just cant get! - by oblexive - 23.07.2012, 12:55
Re: Something I just cant get! - by Cjgogo - 23.07.2012, 13:06
Re: Something I just cant get! - by oblexive - 23.07.2012, 13:11
Re: Something I just cant get! - by Cjgogo - 23.07.2012, 13:22
Re : Something I just cant get! - by lelemaster - 23.07.2012, 13:28
Re: Re : Something I just cant get! - by Cjgogo - 23.07.2012, 13:31
Re: Something I just cant get! - by oblexive - 23.07.2012, 13:35
Re: Something I just cant get! - by Cjgogo - 23.07.2012, 13:48
Re: Something I just cant get! - by Vince - 23.07.2012, 13:51
Re: Something I just cant get! - by oblexive - 23.07.2012, 13:54

Forum Jump:


Users browsing this thread: 2 Guest(s)