25.03.2019, 19:13
So i when you pass 210 KM in your car it should send the message that you are driving too fast.
I tried it, but something doesnt work.
1. I have argument mismatch on return Float:vel; i changed it to return vel; again..
2. It doesnt work at all, im passing 210 KMH and more, but there is no message. help?
I tried it, but something doesnt work.
Code:
stock GetVehicleSpeed(vehicleid) { new Float:vx, Float:vy, Float:vz, Float:vel; vel = GetVehicleVelocity(vehicleid, vx, vy, vz); vel = (floatsqroot(((vx*vx)+(vy*vy))+(vz*vz))* 181.5); return Float:vel; } public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public VehicleSpeed(playerid) { if(IsPlayerInAnyVehicle(playerid)) { if(GetVehicleSpeed(GetPlayerVehicleID(playerid)) >= 210) { SendClientMessage(playerid, COLOR_RED, "You drive too fast, cops are going to chase you now!"); IsWanted[playerid] = 1; } } return 1; }
2. It doesnt work at all, im passing 210 KMH and more, but there is no message. help?