command not working
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Don't send the message that you're not in range in a loop because if you're not in range for the first item but you are for an item, it will send the message and stop.

PHP код:
CMD:pickup(playeridparams[])
{
    new 
bool:inrange;
    for(new 
0MAX_LABELSi++)
    {
        if(
IsPlayerInRangeOfPoint(playerid3.0LabelInfo[i][LabelX], LabelInfo[i][LabelY], LabelInfo[i][LabelZ]))
        {
            
format(GlobalStringsizeof(GlobalString), "%s picks up a weapon shell from the ground."GetUsername(playerid));
            
ProxDetector(15.0playeridGlobalStringCOLOR_PURPLE);
            
Delete3DTextLabel(Text3D:LabelInfo[i][LabelID]);
            
inrange true;
            break;
        }
    }
    if (!
inrangeSendClientMessage(playeridCOLOR_RED"Error:"COL_WHITE" You're not near anything to pickup.");
    return 
true;

Works, but sadly doesn't delete the label?
Reply


Messages In This Thread
command not working - by Jordiee - 12.04.2015, 13:17
Re: command not working - by ATGOggy - 12.04.2015, 13:23
Re: command not working - by Jordiee - 12.04.2015, 13:25
Re: command not working - by Konstantinos - 12.04.2015, 13:25
Re: command not working - by Jordiee - 12.04.2015, 13:28
Re: command not working - by ATGOggy - 12.04.2015, 13:28
Re: command not working - by Jordiee - 12.04.2015, 13:33
Re: command not working - by ATGOggy - 12.04.2015, 13:37
Re: command not working - by Konstantinos - 12.04.2015, 13:37
Re: command not working - by Jordiee - 12.04.2015, 14:23

Forum Jump:


Users browsing this thread: 1 Guest(s)