[Include] dRadar - OnVehiclePassTheLimitedSpeed
#1

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

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

Nice Job Bro +Rep
Reply
#4

Nice work Can you explain me how to create radar
Reply
#5

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

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")
Reply
#7

SUGGESTION:

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

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

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

How would I change this to MPH?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)