SpeedCamera Script
#1

Hello i like to make a speedcamera system but he only prob is i dont know a good line for start with it because i have now (that coordinates are places where the cars comes)
this:

Pastebin
Reply
#2

Under a timer, 1000 or 2000ms.
Reply
#3

What you mean? (i know how to make timers but)
Reply
#4

Quote:
Originally Posted by Knight 47
Посмотреть сообщение
What you mean? (i know how to make timers but)
....
run a timer
pawn Код:
forward chekspd(playerid);
public checkspd(playerid)
{
// your code
}
Reply
#5

it not realy works for me xD
Reply
#6

Increase the range in 'IsPlayerInRangeOfPoint', make sure u made the timer correctly.. What it does is chek position.
Reply
#7

I have set the 'IsPlayerInRangeOfPoint' with 1 number after the , and still xD it fails with me. Can you maybe make a example of a corect timer
Reply
#8

I know this is offtopic, but I doubt he even knows how to script, he wants to take your "example" of a speedcamera.
Reply
#9

pawn Код:
// onplayerconnect
SetTimerEx("check_speed",500,true,"i",playerid);

forward check_speed(playerid);
public check_speed(playerid)
{
    if (IsPlayerInRangeOfPoint(playerid, 20,1821.9,-1611.5,13.3) || IsPlayerInRangeOfPoint(playerid, 20,1821.6,-1747.4,13.3) || IsPlayerInRangeOfPoint(playerid, 20,1690.2,-1732.1,13.3) || IsPlayerInRangeOfPoint(playerid, 20,1689.0,-1592.3,13.37) || IsPlayerInRangeOfPoint(playerid, 20,1428.96,-1592.07,13.39) || IsPlayerInRangeOfPoint(playerid, 20,1429.64,-1731.93,13.38) || IsPlayerInRangeOfPoint(playerid, 20,1529.63,-1732.95,13.39))
    {
        if(IsPlayerConnected(playerid))
        {
                if(!IsPlayerInAnyVehicle(playerid))
                {
                    new speed = GetPlayerSpeed(giveplayerid, true);
                if(speed >= 121)
            {
                        if(IsAPDMember(playerid) && PlayerInfo[playerid][pDBanned] == 0)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Check your speed");
            }
                        if(IsAnFbi(playerid) && PlayerInfo[playerid][pDBanned] == 0)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Check your speed");
            }
                        if(IsAnNg(playerid) && PlayerInfo[playerid][pDBanned] == 0)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Check your speed");
            }
                        else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Busted: You have been captured by a SpeedCamera");
                {WantedPoints[giveplayerid]+= 2; }
            }
            }
        }
        }
        return 1;
    }
Reply
#10

Quote:
Originally Posted by [MW2]Jµ§†пс
Посмотреть сообщение
I know this is offtopic, but I doubt he even knows how to script
I know how to script but i had fail with my timer
i had set
SetTimerEx("speed1",1000,true,"i",playerid);

forward speed1(playerid);
public speed1(playerid)
{
//blablabla

but i was forgotten that i had to put forward ... for the main[] xD fail of me


But thx for help evryone
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)