buy weed command help please.
#3

hmm as far as i see you every time check if the player HASDRUGS, but i dont see ANYwhere that it actually sets teh HASDRUGS to 1, i only see pInfo[playerid][HASWEED] = 1;
pInfo[playerid][PLANTID] = 1759;

so the HASDRUGS stays 0, maybe you should do this:

pawn Код:
COMMAND:buydrugs(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    if(pInfo[playerid][HASDRUGS] == 0 && IsPlayerInRangeOfPoint(playerid, 1.0, -1136.4224,-2861.4194,270.5641))
    {
        pInfo[playerid][HASWEED] = 1;
        pInfo[playerid][PLANTID] = 1759;
        pInfo[playerid][HASDRUGS] = 1;
    }
    if(pInfo[playerid][HASDRUGS] == 0 && IsPlayerInRangeOfPoint(playerid, 1.0, -1140.2141,-2862.9775,270.5641))
    {
        pInfo[playerid][HASCRACK] = 1;
        pInfo[playerid][PLANTID] = 1712;
        pInfo[playerid][HASDRUGS] = 1;
    }
    else
    {
        SendClientMessage(playerid, 0xFFFFFF,"you all ready own some drugs");
    }
    return 1;
}
that should work i think, also if this isnt the point you wanna fix then explain what you want to fix
Reply


Messages In This Thread
buy weed command help please. - by jueix - 28.05.2012, 09:03
Re: buy weed command help please. - by jueix - 28.05.2012, 09:34
Re: buy weed command help please. - by niels44 - 28.05.2012, 09:35

Forum Jump:


Users browsing this thread: 1 Guest(s)