Message appear four times
#5

Try this
PHP Code:
CMD:loadcargo(playeridparams[])
{
    if(
cargopicked[playerid] == 1)
    {
        for(new 
isizeof(meatcar); i++)
        {
            new 
vehicleid meatcar[i];
            if(
IsPlayerInRangeOfVehicle(playeridmeatcar[i], 4))
            {
                
RemovePlayerAttachedObject(playerid0);
                
SendClientMessage(playeridCOLOR_YELLOW"You loaded the cargo into the van, now get inside and drive it.");
                
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s places the bag of meat in the back of the van."ReturnName(playerid0));
                
ClearAnimations(playerid1);
                
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
                
loadedcargo[vehicleid]++;
                break;
//got what you want, stop looping..
            
}
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"You are not behind a van.");
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Message appear four times - by AndreiWow - 29.08.2016, 22:48
Re: Message appear four times - by Sanady - 29.08.2016, 22:57
Re: Message appear four times - by Shinja - 29.08.2016, 23:08
Re: Message appear four times - by AndreiWow - 29.08.2016, 23:10
Re: Message appear four times - by Shinja - 29.08.2016, 23:15
Re: Message appear four times - by PrO.GameR - 30.08.2016, 08:04

Forum Jump:


Users browsing this thread: 3 Guest(s)