help with this script of checking the velocity
#1

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
Reply
#2

Код:
           	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.
Reply
#3

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
Reply
#4

Post the lines number with the codes.
Reply
#5

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.
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)