#2

in your /destroycars cmd
just take the message out of the loop.
just do that:
PHP код:
            new string[128];
            
format(stringsizeof(string), "{FF0000}[Admin Warn]{FF6347} %s has destroyed all Created vehicles (/veh)icle."NORPN(playerid));
            
SendAdminMessage(COLOR_DARKRED1string); 
after the loop's done.
Never use messages in a loop unless you want to spam something :P

the /destroycars cmd should look like this,
PHP код:
CMD:destroycars(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playeridCOLOR_GREY"You are not authorized to use that command!");
    new 
string[103];
    for(new 
0sizeof(cVeh); i++)
    {
        if(
cVeh[i] == INVALID_VEHICLE_ID) continue;
        
DestroyVehicle(cVeh[i]);
        
cVeh[i] = -1;
    }
    
format(stringsizeof(string), "{FF0000}[Admin Warn]{FF6347} %s has destroyed all Created vehicles (/veh)icle."NORPN(playerid));
    
SendAdminMessage(COLOR_DARKRED1string);
    
SendClientMessage(playeridCOLOR_GREY"   Created vehicles destroyed!");
    return 
1;

Reply


Messages In This Thread
Loop - by Lidor124 - 31.12.2013, 20:51
Re: Loop - by CutX - 31.12.2013, 20:56
Re: Loop - by iGetty - 31.12.2013, 21:00

Forum Jump:


Users browsing this thread: 1 Guest(s)