Help me skip a parameter!
#5

Because "A player joined the server." is passed as the first parameter by default, unless otherwise specified.
That's why you use .message="..".

A better example is this
PHP код:
CreateVehicle(vehicletypeFloat:xFloat:yFloat:zFloat:rotationcolor1color2respawn_delayaddsiren=0); 
In this function you first place the vehicletype, then x, y, z, a, etc..
If you want to change the parameters order you simply can do this:
PHP код:
CreateVehicle(.z=3.0, .x=0.0, .y=15.0, .vehicletype=411etc..); 
And it will spawn an infernus (model 411) at X: 0.0, Y: 15.0, Z: 3.0

But in your case it is better to just swap the function arguments so the function will look like this

PHP код:
SendAdminAlert(message[], color COLOR_YELLOW

    foreach(new 
iPlayer
    { 
        if(!
Character[i][Admin]) continue; 
        
Scm(icolormessage); 
    } 
    return 
1

The first parameter will be the message (it's required) and the second one will be the color (which if not specified, it will be by default COLOR_YELLOW)
Reply


Messages In This Thread
Help me skip a parameter! - by DuyDang2412 - 23.07.2017, 07:17
Re: Help me skip a parameter! - by OneDay - 23.07.2017, 07:19
Re: Help me skip a parameter! - by GaByM - 23.07.2017, 07:36
Re: Help me skip a parameter! - by DuyDang2412 - 23.07.2017, 08:50
Re: Help me skip a parameter! - by GaByM - 24.07.2017, 15:52

Forum Jump:


Users browsing this thread: 2 Guest(s)