| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 332 online users. » 0 Member(s) | 328 Guest(s) Bing, Google, Baidu, Applebot
|
| Latest Threads |
The status of the INPC SD...
Forum: Support
Last Post: DLCode
2026-01-07, 07:33 AM
» Replies: 0
» Views: 50
|
SAMP server trailer
Forum: Videos and Screenshots
Last Post: pmemorex2016
2026-01-06, 02:34 PM
» Replies: 0
» Views: 44
|
PROJECT: LOS ANGELES — TH...
Forum: Advertisements
Last Post: DevonH
2026-01-03, 04:04 AM
» Replies: 9
» Views: 1,043
|
I recommend Xiaomi Rednot...
Forum: Tech
Last Post: NoxxeR
2026-01-03, 01:31 AM
» Replies: 0
» Views: 85
|
🌆 Final City RPG – Englis...
Forum: Advertisements
Last Post: Beanny
2026-01-02, 02:46 PM
» Replies: 0
» Views: 79
|
OLD GAMEMODE 0.3DL
Forum: Gamemodes
Last Post: su109551
2026-01-01, 06:59 PM
» Replies: 0
» Views: 127
|
Layanan cs Floa
Forum: General Discussions
Last Post: bratva
2025-12-31, 01:10 PM
» Replies: 5
» Views: 200
|
[ZA] ZOMBIE APOCALYPSE. ...
Forum: Advertisements
Last Post: AlCapone
2025-12-30, 12:02 PM
» Replies: 0
» Views: 89
|
Real-time pathfinder, opt...
Forum: Pawn Scripting
Last Post: ejtamovic
2025-12-30, 08:46 AM
» Replies: 2
» Views: 327
|
After School Roleplay - L...
Forum: Advertisements
Last Post: cosminupgaming
2025-12-29, 09:47 PM
» Replies: 8
» Views: 661
|
|
|
| [easyMysql] error 001: expected token: "-string end-", but found "-identifier-" |
|
Posted by: Aerotactics - 2019-07-17, 06:20 AM - Forum: Pawn Scripting
- Replies (2)
|
 |
I don't see what the issue is.
![[Image: 68edcdeeb1.png]](https://puu.sh/DTHGv/68edcdeeb1.png)
EDIT:
Code: 1116: handle = SQL::CreateTable(table, (isnull(column_where)) ? "InnoDB" : column_where, (isnull(column_where2)) ? "latin5" : column_where2, connectionHandle);
1780: format(SQL::upd_form, sizeof(SQL::upd_form), "%s int %s AUTO_INCREMENT,", field_name, (null == false) ? "NOT NULL" : "NULL");
1788: format(SQL::upd_form, sizeof(SQL::upd_form), "%s int %s PRIMARY KEY AUTO_INCREMENT,", field_name, (null == false) ? "NOT NULL" : "NULL");
|
|
|
|
| Help |
|
Posted by: Xylosjr - 2019-07-17, 05:19 AM - Forum: Pawn Scripting
- Replies (1)
|
 |
Hi, I'm new here and I want to learn how to program with mysql and connect a database
|
|
|
|
| Math: vertical viewing angle |
|
Posted by: Freaksken - 2019-07-15, 08:18 PM - Forum: Pawn Scripting
- Replies (4)
|
 |
I have a system in which I've worked out the code for giving an NPC a horizontal viewing angle (left image). How would I achieve a similar result, but now for the vertical direction (right image)?
![[Image: viewing_angle.png?raw=1]](https://www.dropbox.com/s/tl2biem7emg13be/viewing_angle.png?raw=1)
Below is the code for the left image, for reference. This is a math question, thus the code isn't really necessary, but might help you understand the problem. Just ignore that the angles start from the NPC's center instead of his eyes, that's easy enough to fix. As you can see, the z-position is irrelevant for the horizontal viewing angle, but probably not for the vertical viewing angle (not sure).
PHP Code: static bool:FAI_IsPlayerInAggroViewingAngle(playerid, npcid) { // Get NPC position new Float:xn, Float:yn, Float:zn; FCNPC_GetPosition(npcid, xn, yn, zn);
// Get player position new Float:xp, Float:yp, Float:zp; if(!IsPlayerNPC(playerid)) { GetPlayerPos(playerid, xp, yp, zp); } else { FCNPC_GetPosition(playerid, xp, yp, zp); }
// Calculate the angle between these 2 points new Float:angleBetweenPoints = atan2(xp - xn, yp - yn);
// Get the NPC facing angle adjusted for the weird GTA angle system new Float:npcFacingAngle = 360.0 - FCNPC_GetAngle(npcid);
// Calculate the smallest difference between these 2 angles as a value between -180.0 and 180.0 new Float:angleDifference = angleBetweenPoints - npcFacingAngle; if(angleDifference > 180.0) { angleDifference -= 360.0; } if(angleDifference < -180.0) { angleDifference = 360.0; }
// Get the absolute value of this angle angleDifference = floatabs(angleDifference);
// Check if the player is within the aggro viewing angle if(angleDifference <= FAI_NPCs[npcid][FAI_NPC_AGGRO_VIEWING_ANGLE][playerid]/2) { return true; } return false; }
Here's another visualisation of what the result should look like:
|
|
|
|
| A weird problem with includes |
|
Posted by: mouiz - 2019-07-14, 01:00 PM - Forum: Pawn Scripting
- Replies (7)
|
 |
Quote:#include <../../gamemodes/modes/mode_robbery.pwn>
#include <../../gamemodes/modes/mode_dogfight.pwn>
These are ^ two includes in the 'gamemodes/modes' folder.
If i arrange them like this:?
Quote:#include <../../gamemodes/modes/mode_dogfight.pwn>
#include <../../gamemodes/modes/mode_robbery.pwn>
the 'mode_dogfight' works (gets included)?and the second one is ignored (it shows undefined symbol errors since the definitions of the functions are in the include)
If i arrange them oppositely then the 'mode_robbery' works, the second one is ignore.
How can i fix this?
|
|
|
|
|