Problem with this CMD
#1

pawn Код:
CMD:buydealer(playerid)
{
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
    new string[128];
    for(new b = 0; b < MAX_CARDEALERSHIPS; b++) if(IsPlayerInRangeOfPoint(playerid, 2.0, CarDealer[b][pVehicleSpawnX], CarDealer[b][pVehicleSpawnY], CarDealer[b][pVehicleSpawnZ]))
     {
        if(PlayerInfo[playerid][pDealerKey] == -1)
        {
        CarDealer[b][pOwner] = plname;
        format(string, sizeof(string), "You have just purchased a Dealership! (ID: %d)", b);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "{4BB325}Vehicle Dealership\n{C4C920}[Owner: %s]\n[ID: %d]", plname, b);
        UpdateDynamic3DTextLabelText(CarDealer[b][pLabel], COLOR_WHITE, string);
        PlayerInfo[playerid][pDealerKey] = b;
        }
        else SendClientMessage(playerid, COLOR_GRAD2, "You already own a Dealership!");
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "You are not at a dealership purchase point!");
    return 1;
}
I have this, but whenever I do the CMD it will say I have purchased the dealership but then it will spam me with 'You are not at a dealership point'

It spams me that message 10 times since the max dealerships is 10

So, any idea ;/
Reply


Messages In This Thread
Problem with this CMD - by mSlat3r - 04.11.2012, 16:03
Re: Problem with this CMD - by jotan. - 04.11.2012, 16:10
Re: Problem with this CMD - by mSlat3r - 04.11.2012, 17:00
Re: Problem with this CMD - by mSlat3r - 05.11.2012, 01:34
Re: Problem with this CMD - by Glad2BeHere - 05.11.2012, 01:45
Re: Problem with this CMD - by mSlat3r - 05.11.2012, 02:01
Re: Problem with this CMD - by Smally - 05.11.2012, 02:08
Re: Problem with this CMD - by mSlat3r - 05.11.2012, 02:19

Forum Jump:


Users browsing this thread: 1 Guest(s)