![]() |
#1 |
Big Clucker
![]() ![]() Join Date: Sep 2009
Posts: 73
Reputation: 8
|
![]()
Hi everyone,
With this system you can use a nice navigation feature on your server. In addition to marking the selected location on the map, you can also see the direction of the location by the arrow on the top of the vehicle. » Features
» Images ![]() ![]() » Download » MediaFire « » Note I used zcmd as a command system when coding the system. I’ve also added it in the rar. |
![]() |
![]() |
![]() |
#2 |
Little Clucker
![]() Join Date: Feb 2019
Location: The Forest
Posts: 12
Reputation: 18
|
![]()
It reminds me of the Need For Speed Underground 2 for some reason haha, even tho the arrow in that game was blue as far as I remember. You done a good job.
|
![]() |
![]() |
![]() |
#3 |
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2012
Posts: 5,352
Reputation: 1272
|
![]()
Never check if floats are equal to a specific value! Always <= or >=
Code:
if (yc == 0.0 || xc == 0.0) { if(yc == 0 && xc > 0) angle = 0.0; else if(yc == 0 && xc < 0) angle = 180.0; else if(yc > 0 && xc == 0) angle = 90.0; else if(yc < 0 && xc == 0) angle = 270.0; else if(yc == 0 && xc == 0) angle = 0.0; } Code:
pPos[0] = NavData[pNavID[playerid]][NAV_X]; pPos[1] = NavData[pNavID[playerid]][NAV_Y]; pPos[2] = NavData[pNavID[playerid]][NAV_Z]; How do you know that will work for all vehicles and look good? Code:
AttachObjectToVehicle(ok[playerid], GetPlayerVehicleID(playerid), 0.000000, 0.000000, 1.399998, 0.000000, 90.0, rot + 180); Code:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}<!> You must be in a vehicle to use navigation!"); Code:
ShowPlayerDialog(playerid, 112, DIALOG_STYLE_LIST, "[Navigation] Locations", string, "Select", "Close"); Code:
if(IsValidObject(ok[playerid])) DestroyObject(ok[playerid]); Always avoid creating player textdraws when a player connects. Reason being, maybe they disconnect. Maybe they fail to log in. What is the point of creating textdraws that majority of the time probably won't be used? Create when a player types a command or when a player actually logs in (gamemodes). Code:
public OnPlayerConnect(playerid) { NAVpTD[playerid] = CreatePlayerTextDraw(playerid, 405.724487, 415.166564, "Distance Left: ~y~0000.00m"); PlayerTextDrawLetterSize(playerid, NAVpTD[playerid], 0.179326, 1.109999); PlayerTextDrawAlignment(playerid, NAVpTD[playerid], 1); PlayerTextDrawColor(playerid, NAVpTD[playerid], -1); PlayerTextDrawSetShadow(playerid, NAVpTD[playerid], 0); PlayerTextDrawSetOutline(playerid, NAVpTD[playerid], 0); PlayerTextDrawBackgroundColor(playerid, NAVpTD[playerid], 255); PlayerTextDrawFont(playerid, NAVpTD[playerid], 2); PlayerTextDrawSetProportional(playerid, NAVpTD[playerid], 1); PlayerTextDrawSetShadow(playerid, NAVpTD[playerid], 0); return 1; } |
![]() |
![]() |
![]() |
#4 | |
Big Clucker
![]() ![]() Join Date: Sep 2009
Posts: 73
Reputation: 8
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2012
Posts: 5,352
Reputation: 1272
|
![]()
There is a lot in this most of it is harmless but a few critical mistakes.
|
![]() |
![]() |
![]() |
#6 |
Big Clucker
![]() ![]() Join Date: Sep 2009
Posts: 73
Reputation: 8
|
![]() |
![]() |
![]() |
![]() |
#7 |
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2012
Posts: 5,352
Reputation: 1272
|
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Y_INI GANG SYSTEM SAVING HELP.. (Just need right direction), | Scrillex | Scripting Help | 6 | 12/04/2014 05:27 PM |
My Navigation/GPS System | Austin | Help Archive | 24 | 03/01/2011 12:00 PM |
Navigation System - SetObjectRot to AttachObjectToPlayer | Stas92 | Help Archive | 4 | 22/05/2010 09:17 AM |
[FilterScript] [FS] Navigation System | Michelle1991 | Filterscripts | 30 | 19/09/2009 01:29 PM |
[FilterScript] [FS] SA Navigation System | Weed_ | Filterscripts | 15 | 07/04/2009 09:43 PM |