SA-MP Forums Archive
[Include] dRadar - OnVehiclePassTheLimitedSpeed - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] dRadar - OnVehiclePassTheLimitedSpeed (/showthread.php?tid=401414)



dRadar - OnVehiclePassTheLimitedSpeed - [D]ry[D]esert - 22.12.2012

Hello every one.

I want to make such a nice include to help roleplay servers.
*Defines*
pawn Код:
//@=================================================================================================@
//|                                             Defines                                             |
//|                                                                                                 |
//@=================================================================================================@
#define         MAX_RADARS                  (30)            //Maxium ammount of radars can be created.
#define         ALLOWED_SPEED               (120)           //The allowed of vehicle's speed(KM).
#define         CREATE_3DTEXT_LABEL         (true)          //Create the Text 'Radar' on the rader. true for yes, false for no
#define         LABEL_DRAW_DISTANCE         (20)            //Draw distance for the label.(Wont work if CREATE_3DTEXT_LABEL == false.
#define         CAMERA_RANGE                (12)            //The range which camera can reach to detect if player has passed the limited speed
#define         PLAY_CAMERA_SOUND           (true)          //when player pass the limite speed, it will play camera sound. true for enable and false for disable.
#define         LABEL_COLOR_TEXT            (0x0000BBAA)    //Set label color.(wont work if CREATE_3DTEXT_LABEL == false.)
#define         LABEL_TEXT                  "Radar"         //Set label Text.(wont work if CREATE_3DTEXT_LABEL == false.)
here is small preview about the include



*Example*
pawn Код:
public OnVehiclePassTheLimitedSpeed(playerid, vehicleid)
    {
        SendClientMessage(playerid,-1,"You have passed the limited speed!");
        return 1;
    }
*Credits*
[D]ry[D]esert.
Samp team.
How to create radar ?
Easy and simple, we have:
pawn Код:
CreateRadar(type,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,Float:DrawDistance)
for example
pawn Код:
public OnGameModeInit()
{
    CreateRadar(1,2056.9988,1509.4733,11.0693,0,0,141.6453,20.8);
    return 1;
    //rest of your code here
}
*Types of camera*
Type 1


Type 2



*How to install ?*
1- Download the file from.
2- Paste it in the file Pawno/include
3-Add this to your gamemode under #include <a_samp>
pawn Код:
#include <dRadar.inc>
*Downloads*
pastebin -> Click me
solidfiles -> Click me


*if you saw bug, please PM me or post it here .
*if you have any suggestion please post it here.



Re: dRadar - OnVehiclePassTheLimitedSpeed - Sting. - 22.12.2012

Wow this is freaking Awesome, great for RP Servers though.


Re: dRadar - OnVehiclePassTheLimitedSpeed - Patrick - 22.12.2012

Nice Job Bro +Rep


AW: dRadar - OnVehiclePassTheLimitedSpeed - mikjo - 22.12.2012

Nice work Can you explain me how to create radar


Re: AW: dRadar - OnVehiclePassTheLimitedSpeed - [D]ry[D]esert - 23.12.2012

Quote:
Originally Posted by mikjo
Посмотреть сообщение
Nice work Can you explain me how to create radar
I've already did. read the topic again.


Re: dRadar - OnVehiclePassTheLimitedSpeed - xer0 - 30.12.2012

I changed define values and there is some warnings

warning 201: redefinition of constant/macro (symbol "LABEL_COLOR_TEXT")
warning 201: redefinition of constant/macro (symbol "LABEL_TEXT")


Re: dRadar - OnVehiclePassTheLimitedSpeed - iWhite - 31.12.2012

SUGGESTION:

Add Float:max_speed parameter in CreateRadar, because someone wants to make not all radars same


Re: dRadar - OnVehiclePassTheLimitedSpeed - [D]ry[D]esert - 01.01.2013

Quote:
Originally Posted by xer0
Посмотреть сообщение
I changed define values and there is some warnings

warning 201: redefinition of constant/macro (symbol "LABEL_COLOR_TEXT")
warning 201: redefinition of constant/macro (symbol "LABEL_TEXT")
Hmm, Open dRadar.inc and change the definitions.

Quote:
Originally Posted by iWhite
Посмотреть сообщение
SUGGESTION:

Add Float:max_speed parameter in CreateRadar, because someone wants to make not all radars same
Thanks for suggestion, i'll add that in next version.


Re: dRadar - OnVehiclePassTheLimitedSpeed - Xlithan - 09.01.2013

Nice, works great. I've extended this script so that it adds a wanted star automatically.


Re: dRadar - OnVehiclePassTheLimitedSpeed - Xlithan - 12.01.2013

How would I change this to MPH?