help with this script of checking the velocity -
akki - 01.02.2013
hello i am new to scripting and this is really creating problem for me
actually in this i am trying to get the velocity of a player at a particular point and check if the velocity is greater than 60. if it is greater than they need to be fined.
i have not made the fine part but the part to check the speed and give the warning is also not working.
and i am getting warkings in it.
here is the code
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new float:x,float:y,float:z;
if(pickupid == check_speed_1)
{
if(IsPlayerInAnyVehicle(playerid))
{
GetPlayerVelocity(playerid,x,y,z);
if (x > 60 || y > 60)
{
SendClientMessage(playerid,COLOR_WHITE,"you have been fined for over speeding");
}
}
}
return 1;
}
and these are the Warnings that i have been receiving
Код:
D:\san andreas\server\gamemodes\flixter_rp.pwn(205) : warning 213: tag mismatch
D:\san andreas\server\gamemodes\flixter_rp.pwn(205) : warning 213: tag mismatch
D:\san andreas\server\gamemodes\flixter_rp.pwn(205) : warning 213: tag mismatch
D:\san andreas\server\gamemodes\flixter_rp.pwn(206) : warning 213: tag mismatch
D:\san andreas\server\gamemodes\flixter_rp.pwn(206) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Warnings.
and also please tell me the object id for the speed camera in samp (the yellow camera).
please help
AW: help with this script of checking the velocity -
Blackazur - 01.02.2013
Код:
GetPlayerVelocity(playerid,x,y,z);
Here you need the X, Y and Z Coordinate, you can find this in the gta san andreas user files > SAMP > savedpositions.
Код:
if (x > 60 || y > 60)
And here too, or just
on top of your script the coordinates then you can use x, y and z, without pasting the coordinates.
Re: AW: help with this script of checking the velocity -
akki - 01.02.2013
Quote:
Originally Posted by Blackazur
Код:
GetPlayerVelocity(playerid,x,y,z);
Here you need the X, Y and Z Coordinate, you can find this in the gta san andreas user files > SAMP > savedpositions.
Код:
if (x > 60 || y > 60)
And here too, or just on top of your script the coordinates then you can use x, y and z, without pasting the coordinates.
|
i am using getplayerpos and not setplayerpos and i guess you need the x,y,z coordinates from savedpositions only for setplayerpos and for the other
Re: help with this script of checking the velocity -
RedCrossER - 01.02.2013
Post the lines number with the codes.
AW: Re: AW: help with this script of checking the velocity -
Blackazur - 01.02.2013
Quote:
Originally Posted by akki
i am using getplayerpos and not setplayerpos and i guess you need the x,y,z coordinates from savedpositions only for setplayerpos and for the other
|
Ops right, my Mistake.
Re: help with this script of checking the velocity -
akki - 01.02.2013
Quote:
Originally Posted by ******
All of that is gibberish. The problem is that PAWN is case-sensitive and you used "float" instead of "Float".
|
thanks this help removed the warnings but unfortunately.
this did not work in server and the message did not show up