24.07.2017, 15:52
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
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:
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
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)
That's why you use .message="..".
A better example is this
PHP код:
CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren=0);
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=411, etc..);
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 i: Player)
{
if(!Character[i][Admin]) continue;
Scm(i, color, message);
}
return 1;
}