Error 035: argument type mismatch (argument 2)
#1

Here is the line of code it says the error is in:
Код:
GetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
Am I putting this line in a section it isn't mean't to be in? I put it under OnPlayerKeyStateChange because i'm trying to make it so when you press the horn button your vehicle gets boosted.

Someone help me please?
Reply
#2

https://sampwiki.blast.hk/wiki/GetVehicleVelocity
Reply
#3

Let me fix that ...
pawn Код:
new Float:x, Float:y, Float:z;

GetVehicleVelocity(GetPlayervehicleID(playerid), x, y, z);
More on GetVehicleVelocity here.
Reply
#4

you are getting the vehicle velocity
so you must store the values in order to print them somewhere.
eg:
pawn Код:
new Float:Value[3], string[150];
GetVehicleVelocity(GetPlayerVehicleID(playerid), Value[0], Value[1], Value[2]);
format(string, sizeof(string), "Velocity:  X%f  Y%f  Z%f ", Value[0], Value[1], Value[2]);
SendClientMessage(playerid, -1, string);
edit: too late xD
Reply
#5

That's one bad habit you got there, the poster above me. Why making the string 150 when you don't even use half those characters?
Reply
#6

Thanks, it worked
Reply
#7

Quote:
Originally Posted by Berlovan
Посмотреть сообщение
That's one bad habit you got there, the poster above me. Why making the string 150 when you don't even use half those characters?
before posting it had more text but i deleted to make it smaller.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)