CreateVehicle -
McGuiness - 02.05.2015
Hi everyone,
I am trying to test out this new system native CreateVehicle(vehicletype, Float
![angry](images/smilies/mad.gif)
, Float:y, Float:z, Float:rotation, color1, color2, respawndelay, addsiren=0); and says that audio of the sirens plays on it, but the problem is when I try it in game nothing happens, here is the code and it comes with a warning as well (note that I have updated the includes etc)
pawn Код:
CMD:sveh(playerid, params[])
{
new id, Float:pos[4], col[2];
if(sscanf(params, "iii", id, col[0], col[1])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [vehicleid/destroy] [color1] [color2]");
if(id < 400 || id > 611) return SendClientMessage(playerid, COLOR_GREY, "Vehicles are between 400 and 611.");
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
CreateVehicle(id, pos[0], pos[1], pos[2], pos[3], col[0], col[1], 12000, 0);
return 1;
}
The warning is this:
warning 202: number of arguments does not match definition < This code only goes for the CreateVehicle, as when I take the siren part off it works :/
Re: CreateVehicle -
Mencent - 02.05.2015
Hello!
Are you updated your server includes?
By the way, write your code so, CreateVehicle need a 1 for the sirene.
PHP код:
CMD:sveh(playerid, params[])
{
new id, Float:pos[4], col[2];
if(sscanf(params, "iii", id, col[0], col[1])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [vehicleid/destroy] [color1] [color2]");
if(id < 400 || id > 611) return SendClientMessage(playerid, COLOR_GREY, "Vehicles are between 400 and 611.");
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
CreateVehicle(id, pos[0], pos[1], pos[2], pos[3], col[0], col[1], 12000, 1);
return 1;
}
Re: CreateVehicle -
ihatetn931 - 02.05.2015
I have the same problem, i've updated all my includes.
Код:
gamemodes\wip.pwn(6176) : warning 202: number of arguments does not match definition
Line 6176
pawn Код:
CreateVehicle(modelid,x+2,y,z+2,a,color1,color2,-1,1);
Re: CreateVehicle -
McGuiness - 02.05.2015
Which ones though? I have done the pawno includes and I still get that same warning for the code
Re: CreateVehicle -
Mencent - 02.05.2015
A row of my script:
PHP код:
return CreateVehicle(560,Pos[0],Pos[1],Pos[2],0.0,19,19,-1,0);
and it works clearly
Re: CreateVehicle -
ihatetn931 - 02.05.2015
Quote:
Originally Posted by McGuiness
Which ones though? I have done the pawno includes and I still get that same warning for the code
|
It's in your a_vehicle.inc
Re: CreateVehicle -
McGuiness - 02.05.2015
Quote:
Originally Posted by Mencent
A row of my script:
PHP код:
return CreateVehicle(560,Pos[0],Pos[1],Pos[2],0.0,19,19,-1,0);
and it works clearly ![Wink](images/smilies/wink.png)
|
Even with that am still getting the same warning
Re: CreateVehicle -
McGuiness - 02.05.2015
Quote:
Originally Posted by ihatetn931
It's in your a_vehicle.inc
|
I know that, its just there is that include folder as well where the include folder is located in the same place as the SA-MP's exe
Re: CreateVehicle -
Mencent - 02.05.2015
Update your whole file, not only the includes.
Re: CreateVehicle -
McGuiness - 02.05.2015
Quote:
Originally Posted by Mencent
Update your whole file, not only the includes.
|
Still giving me that warning its doing my heading in now