SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.02 seconds.
Search: Posts Made By: DRIFT_HUNTER
Forum: Scripting Help 23/09/2020, 06:04 PM
Replies: 10
Views: 183
Posted By DRIFT_HUNTER
Re: Variable question

Yes Iter_Clear is for emptying iterator. You just reminded me, if you want to remove element from iterator while looping thru it, you must use Iter_SafeRemove instead of just Iter_Remove.

About...
Forum: Scripting Help 23/09/2020, 03:25 PM
Replies: 10
Views: 183
Posted By DRIFT_HUNTER
Re: Variable question

Yep, like he said, just use Iter_Contains, use macro if you want to alias it
Forum: Scripting Help 23/09/2020, 02:10 PM
Replies: 10
Views: 183
Posted By DRIFT_HUNTER
Re: Variable question

As far as i understand you want to create iterator for group/set of players and to chose random player from it,and also add and remove players from that group/set.

If so, then i suggest to check...
Forum: Scripting Help 22/09/2020, 11:32 AM
Replies: 5
Views: 154
Posted By DRIFT_HUNTER
Re: Which callback would work?

No need to use OnPlayerUpdate for such task, it wont matter if gate is opened second earlier or later, so use timer for that. Or even better use streamer and let it handle most of the work using...
Forum: Scripting Help 20/09/2020, 05:22 PM
Replies: 3
Views: 110
Posted By DRIFT_HUNTER
Re: More efficient anti FLY Hack

Measure traveled distance over time, and you could check player velocity over time of few seconds...
Forum: Scripting Help 19/09/2020, 11:12 AM
Replies: 3
Views: 109
Posted By DRIFT_HUNTER
Re: Free Scripters

Foreach is stripped from YSI's library, there its called y_iterate and i suggest you to use that since you can define own iterators and much more.

https://github.com/pawn-lang/YSI-Includes...
Forum: Scripting Help 19/09/2020, 10:54 AM
Replies: 2
Views: 95
Posted By DRIFT_HUNTER
Re: DeAMX?

If there is no deAMX protection then yes theoretically you could get source back, but most functions and variables wont have names you gave them, they will just be named generically like var1, var2,...
Forum: Scripting Help 18/09/2020, 10:07 AM
Replies: 5
Views: 138
Posted By DRIFT_HUNTER
Re: Dudas

What you need is any site that allows direct link to a file. One possible solution could be heroku, i used their free dyno for many things
Forum: Scripting Help 18/09/2020, 09:36 AM
Replies: 9
Views: 234
Posted By DRIFT_HUNTER
Re: help mysql

Well i never changed mysql port just because it was used by another problem. Anyway you are getting that error because mysql plugin does not recognize port in host parameter. You need to init mysql...
Forum: Scripting Help 18/09/2020, 09:13 AM
Replies: 8
Views: 131
Posted By DRIFT_HUNTER
Re: MYSQL running 2 tables at the same time

Did you define keys and foreign keys on tables? It would be nice to have structure for those two tables.
You can export your database structure and send us those two tables.

But before you do...
Forum: Scripting Help 17/09/2020, 08:53 PM
Replies: 10
Views: 316
Posted By DRIFT_HUNTER
Re: Compile takes 1600 seconds

Biggest reason for large footprint and long compiling time are constant array's. It can also be caused by allot of objects defined in file. But my bet is constant/static arrays.
Forum: Scripting Help 17/09/2020, 08:50 PM
Replies: 8
Views: 168
Posted By DRIFT_HUNTER
Re: Optidraw Error

#define OD_METHOD METHOD_BOX
#include < optidraw >
#define objectmodel objectmodel2
#include < modelsizes >...
Forum: Scripting Help 17/09/2020, 06:54 PM
Replies: 8
Views: 168
Posted By DRIFT_HUNTER
Re: Optidraw Error

Ok, i just checked optidraw include, it already includes modelsizes so you dont need to include that.
In short you dont need my fix from before just these:

#define OD_METHOD ...
Forum: Scripting Help 17/09/2020, 06:15 PM
Replies: 8
Views: 168
Posted By DRIFT_HUNTER
Re: Optidraw Error

Try

#include < optidraw >
#define objectmodel objectmodel2
#include < modelsizes >
Forum: Scripting Help 15/09/2020, 10:28 PM
Replies: 22
Views: 670
Posted By DRIFT_HUNTER
Re: Pathfinder + FCNPC

A bit off topic, but then again its about NPC's so its kind of on topic.

Keep in mind that PathFinder plugin is using MapAndreas, not ColAndreas. It wont be able to find valid paths inside...
Forum: Scripting Help 15/09/2020, 08:54 PM
Replies: 8
Views: 160
Posted By DRIFT_HUNTER
Re: Can someone help me?

Did you paste everything? :D Jokes aside, that error should not happen if you copied and pasted everything in order it was posted.
Forum: Scripting Help 15/09/2020, 12:06 PM
Replies: 7
Views: 204
Posted By DRIFT_HUNTER
Re: how to make the system hungry?

And why would you need such check in given case? Since it will be called only at food value 40,30,20 and 10...
Forum: Scripting Help 15/09/2020, 12:03 PM
Replies: 2
Views: 80
Posted By DRIFT_HUNTER
Re: Betting system question

foreach(new bid: Player)
{
if(pBettedOn[bid] == INVALID_PLAYERID && pBettedOn[bid] == winnerid && pBet[bid] != 0)
{
//Give him money or whatever...
}
}
Forum: Scripting Help 15/09/2020, 10:17 AM
Replies: 7
Views: 204
Posted By DRIFT_HUNTER
Re: how to make the system hungry?

Create array for max players and set repeating timer. Inside timer callback decrease hunger and check if its 0. If it is 0 then kill player or start decreasing his health...
Forum: Scripting Help 14/09/2020, 01:57 PM
Replies: 10
Views: 410
Posted By DRIFT_HUNTER
Re: Actors with fake weapons

Is far as im aware actors cant hold weapons and you cant attach object to them. 2000 actors seems like overkill (probably can be optimized), but thats just a guess, it might be justified in some...
Forum: Scripting Help 13/09/2020, 11:33 AM
Replies: 5
Views: 114
Posted By DRIFT_HUNTER
Re: I need help with my script!

He only needs to pickup it once and command will work all the time. All he needs to do is check if player is in range of that pickup and nothing more.
Forum: Scripting Help 12/09/2020, 08:06 PM
Replies: 6
Views: 185
Posted By DRIFT_HUNTER
Re: Error zcmd

Use these (basically its slightly updated version of zcmd)
https://github.com/YashasSamaga/I-ZCMD/blob/master/izcmd.inc
Forum: Scripting Help 10/09/2020, 10:17 AM
Replies: 6
Views: 288
Posted By DRIFT_HUNTER
Re: Fixing transparency of objects?

You are probably missing another object. If not then use any samp object that will cover that, or try texture studio, if it has material index then you can use whatever texture you want...
Forum: Scripting Help 08/09/2020, 05:55 PM
Replies: 2
Views: 106
Posted By DRIFT_HUNTER
Re: Linux start/restart/stop SAMP server from webserver (php)

https://forum.sa-mp.com/showthread.php?t=166998
Forum: Scripting Help 08/09/2020, 04:06 PM
Replies: 6
Views: 218
Posted By DRIFT_HUNTER
Re: INSERT INTO error #1064 while executing query

Just to make something clear. You are using values like '%d' and '1'
Dont quote them, they are not strings, and only strings should be quoted in SQL query.
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 05:08 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.