SA-MP Forums Archive
help with this script of checking the velocity - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with this script of checking the velocity (/showthread.php?tid=412260)



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
Код:
#define
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
Код:
#define
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