Silenced Pistol Speed Checker
#1

I'm wondering if it's possible to turned the Silenced pistol into a speed checker weapon for police
For example

Код:
*Shoots Car*
"ShowTextDrawForPlayer(playerid,VehicleSpeed);"
*Returns text draw and shows how fast the car is was going when you shot judging from the speedometer you are using*
*10 Second Timer For Textdraw*
"HideTextDrawforPlayer(playerid);
So, is this possible? What functions would i use to do it?
Reply
#2

Yes, but the car would be hit by a bullet and probably scare the shit out of the driver, causing him to speed :P
Reply
#3

Well real police doesn't shoot you they just aim at you with that thingy.
Reply
#4

Lol @ Lenny..

@Whizion there is no object to aim in GTA.. By shooting the car im guessing it will make contact and return the speed.. If there is any other way, please say so. I was worried about the gun technique too, It would damage the car
Reply
#5

ive made a script that im sure will work.

just i need to test
Reply
#6

Launch it up on a server and PM me the IP, i'll help ya test it
Reply
#7

Sorry to bump this.. But has anyone got a similar system like this or can show me the functions to use.

Yeah, i've searched, but i have absolutely no idea what this is called, if i put "Speed" only speedometers come up
Reply
#8

yeah is it possible to do a speed gun like if player standing still and aiming at vehicle and the vehicle is at move and the aimer will aim at the vehicle and the vehicle will return the speed of it?
Reply
#9

Put the code under OnPlayerKeyStateChange, check if key = fire, perform a check of which weapon the player is using, use GetPlayerCameraPos, get the vehicle ID from the position (perform a loop of all vehicles in range of where the shot was at), use one of the pre-existing speed checking functions on the vehicle ID, send a textdraw with the speed etc.

Shady91 scripted something similar a while ago that he showed me ([ame]http://www.youtube.com/watch?v=K01H38bLVRc[/ame]) which may be released in his 'City Role Play' script.

I would have written the code for you, but I can't really be bothered.
Reply
#10

I've taken the one from City Role Play
Fixed up alot of errors, now these are the only errors left, Anyone got any idea how to fix em up?

Код:
 (17630) : error 035: argument type mismatch (argument 2)
 (17631) : error 035: argument type mismatch (argument 2)
 (17632) : error 035: argument type mismatch (argument 2)
Код:
    if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1) return SendClientMessage(playerid, "You need to be a cop to use this.");
    if(GetPVarInt(playerid, "SpeedGunStat") == 1) return KillTimer(GetPVarInt(playerid, "SpeedGunTimer")), SetPVarInt(playerid, "SpeedGunStat", 0), TextDrawDestroy(Text:GetPVarInt(playerid, "SpeedoDraw")), SendClientMessage(playerid, "You turned your speedo gun off");
    SetPVarInt(playerid, "SpeedGunTimer", SetTimerEx("GetCarSpeed", 1000, 1, "i", playerid)); GivePlayerWeapon(playerid, 43, 1); SendClientMessage(playerid, "You turned on your speed gun.");
Код:
(20539) : error 035: argument type mismatch (argument 2)
Код:
if(GetPVarInt(playerid, "SpeedGunWatch") == 20) return KillTimer(GetPVarInt(playerid, "SpeedGunTimer")), SetPVarInt(playerid, "SpeedGunStat", 0), TextDrawDestroy(Text:GetPVarInt(playerid, "SpeedoDraw")), SendClientMessage(playerid, "Your speed gun was turned off as it was not being used.");
Код:
(20585) : warning 208: function with tag result used before definition, forcing reparse
Код:
stock IsPlayerAimingAt(playerid, Float:x, Float:y, Float:z, Float:radius)
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)