SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.01 seconds.
Search: Posts Made By: Macluawn
Forum: Gamemode Scripts 11/07/2016, 08:29 PM
Replies: 3,148
[GameMode] [GM] The Godfather
Views: 1,388,853
Posted By Macluawn
Re: [GM] The Godfather

You wouldn't throw a book out just because it's a few years old. This gamemode has passed the test of time.

Going through the code is a good learning experience, showing how limitations of that...
Forum: Scripting Help 11/07/2016, 08:10 PM
Replies: 5
Views: 437
Posted By Macluawn
Re: How to Learn

So far there's been a suckish advice:

The wiki is a more or less a reference material; if you have no idea what you're looking for, it's of no use.
Pawn Language Guide is what the name says...
Forum: Scripting Help 25/06/2016, 10:34 PM
Replies: 3
Views: 544
Posted By Macluawn
Re: Problem with checking player zone.

What exactly is not working?
Syntax looks okayish, but we're not mind readers over here.
Forum: Scripting Help 15/06/2016, 04:02 AM
Replies: 6
Views: 1,102
Posted By Macluawn
Re: MySQL Question

If it works as it, dont touch it. Only change the structure if you find it to be a bottleneck (which isn't likely).

Joins and subqueries are the bread and butter of relation databases. Remember to...
Forum: Scripting Help 15/06/2016, 01:57 AM
Replies: 6
Views: 1,102
Posted By Macluawn
Re: MySQL Question

If you havent done that, your database is not normalized.
But you dont need to follow all 6 normalforms (or howevermany there are). Denormalization is about performance after all, so I wouldnt...
Forum: Scripting Help 03/05/2016, 09:54 PM
Replies: 46
Views: 9,780
Posted By Macluawn
Re: Tiny But Super Optimizations

It's the difference between light travelling 30 meters and 60 meters.. You won`t notice it.
Forum: Scripting Help 04/04/2016, 07:46 PM
Replies: 15
Views: 4,778
Posted By Macluawn
Re: Anti Advertising without regex

How about not going down npm's road, and actually fix the problem in the plugin instead if making something new?
Forum: Scripting Help 02/04/2016, 07:48 PM
Replies: 15
Views: 4,778
Posted By Macluawn
Re: Anti Advertising without regex

What is your argument against regex? Some benchmarks might be useful.
Forum: Scripting Help 29/03/2016, 07:17 PM
Replies: 5
Views: 1,007
Posted By Macluawn
Re: Menu Systems

Looks great, Infamous. No problems with different resolutions?
Forum: Scripting Help 26/03/2016, 08:43 PM
Replies: 3
Views: 1,241
Posted By Macluawn
Retrieving player`s pagesize

Is there a reliable way to get a player`s chat pagesize? (as set by /pagesize command)
Back in 2012 there was a suggestion by Pablo Borsellino...
Forum: Includes 04/02/2016, 09:11 PM
Replies: 11
Views: 2,476
Posted By Macluawn
Re: mBits - better than Booleans

How does this differ from rBits (http://forum.sa-mp.com/showthread.php?t=275142) ?
Forum: Scripting Help 29/11/2015, 01:25 PM
Replies: 14
Views: 1,804
Posted By Macluawn
Re: I am wondering

Jay.. What about a more complex scenario? Example, team A can`t hit Team B and team B can`t hit team C, but team C can hit team A.
Forum: Scripting Help 28/11/2015, 11:53 AM
Replies: 14
Views: 1,804
Posted By Macluawn
Re: I am wondering

They want a different functionality than that which SetPlayerTeam provides.
Forum: Scripting Help 18/11/2015, 08:19 PM
Replies: 3
Views: 434
Posted By Macluawn
Re: Vehicle use

Some notes:
In the loop you have Total_Veh_Created. What happens when you create, say, 100 vehicles and delete the 50th vehicle.. total vehicles will be 99, but ID 100 will still be in use and the...
Forum: Scripting Help 12/11/2015, 07:52 PM
Replies: 10
Views: 1,160
Posted By Macluawn
Re: Run time error 4: "Array index out of bounds"

The logic seems a bit off..

First you are creating a vehicle from existing data (not from the database) only to get an ID.. and then use the id to set the data in the array. Is this what you...
Forum: Scripting Help 12/11/2015, 07:46 PM
Replies: 7
Views: 853
Posted By Macluawn
Re: Spawn random vehicles in loop

Number of vehicle models is not the same as number of vehicles. The logs show the intended information.
Forum: Scripting Help 12/11/2015, 07:44 PM
Replies: 9
Views: 580
Posted By Macluawn
Re: [MYSQL]Help Please

Is your mysql server run locally?
If not, check your remote servers firewall configuration. By default I believe non-local connections are dropped.
Forum: Scripting Help 12/11/2015, 08:31 AM
Replies: 7
Views: 853
Posted By Macluawn
Re: Spawn random vehicles in loop

Show us RandomVehicles array definition
Forum: Scripting Help 12/11/2015, 08:26 AM
Replies: 9
Views: 580
Posted By Macluawn
Re: [MYSQL]Help Please

90% of the time it is caused by either:

MySQL server not actually running;
Wrong port;
Firewall configuration is blocking access.


Also, unless you 100% know what you are doing, use a...
Forum: Scripting Help 10/11/2015, 12:21 PM
Replies: 2
Views: 643
Posted By Macluawn
Re: Trailers

In Addition to detaching the trailer, return false on the callback. As a result, other players wont receive an update about it.
Forum: Scripting Help 05/11/2015, 12:20 PM
Replies: 9
Views: 696
Posted By Macluawn
Re: Algorithm for rank points

To get the score needed from the table, there`s a simple sum formula,
http://www.regentsprep.org/regents/math/algtrig/atp2/ArithG3.gif
So, for example, for level 10 it would go like

S(10) =...
Forum: Scripting Help 05/11/2015, 11:55 AM
Replies: 9
Views: 696
Posted By Macluawn
Re: Algorithm for rank points

Slight confusion, since you edited your first post.
Your description, example and image contains different values.
For level 4, 70 points are needed in total or additional 70 points after reaching...
Forum: Scripting Help 05/11/2015, 11:47 AM
Replies: 9
Views: 696
Posted By Macluawn
Re: Algorithm for rank points

True, although for small values you won`t have a problem.
But if you must..if you know the maximum level before hand, DP can be used (dynamic programming)

levelPoints(level)
{
new...
Forum: Scripting Help 05/11/2015, 11:41 AM
Replies: 9
Views: 696
Posted By Macluawn
Re: Algorithm for rank points

A basic equation for that would be the following, where n is the level you want.
f(1) = 10
f(n) = f(n-1) + 10*(n-1)

A recursive function for it, although it could also use a loop.
...
Forum: Scripting Help 31/10/2015, 08:17 PM
Replies: 3
Views: 384
Posted By Macluawn
Re: Mysql Problem!

That`s called recursion https://en.wikipedia.org/wiki/Recursion

On line 5, mysql is instructed to call CheckQuery1 query, which in return calls the query again and again calls that callback and so...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 01:01 PM.


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