SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 320
Search took 0.01 seconds.
Search: Posts Made By: AmigaBlizzard
Forum: Scripting Help 17/09/2018, 10:18 PM
Replies: 26
Views: 349
Posted By AmigaBlizzard
Re: OnPlayerWeaponEmpty

The update was done in March 2015 (according to a post by Emmet on page 17 of that topic).

Can you find that callback in the include file?
If you find it, it should also have the forward...
Forum: Scripting Help 17/09/2018, 10:02 PM
Replies: 26
Views: 349
Posted By AmigaBlizzard
Re: OnPlayerWeaponEmpty

If this is part of an include made by Emmet (, you may want to try OnPlayerEmptyWeapon instead of OnPlayerWeaponEmpty, it was renamed in an update.
Forum: Bug Reports 16/09/2018, 09:17 AM
Replies: 15
Views: 3,392
Posted By AmigaBlizzard
Re: Server crash when destroyvehicle

Or you could set a flag for that vehicle and destroy it under OnVehicleSpawn in case the flag was set.
Forum: Scripting Help 04/09/2018, 11:20 AM
Replies: 5
Views: 146
Posted By AmigaBlizzard
Re: How can I list all enum data in dialog box

You're adding your entered location to every index of your GPS array, overwriting every previously added location.
You have to find a free spot and only add it to that free spot, then abort the...
Forum: Scripting Help 17/08/2018, 10:58 AM
Replies: 3
Views: 108
Posted By AmigaBlizzard
Re: Player stats not saving everything

Can you put a print statement between the lines and post those as well, so we can see what the values are that are being inserted into the query?
You can do that to debug your query and see what...
Forum: Scripting Help 17/08/2018, 10:53 AM
Replies: 4
Views: 165
Posted By AmigaBlizzard
Re: Money textdraw!

Also some tip is to read the important notes here:

It says the text cannot be empty or your server may crash.
Use the underscore to at least have...
Forum: Scripting Help 17/08/2018, 10:47 AM
Replies: 1
Views: 68
Posted By AmigaBlizzard
Re: Esc Key code?

My guess would be that this 3D Text Label is being displayed and updated by a 1 second timer.
And using OnPlayerUpdate to detect if the player's game is being updated.
When a player presses ESC,...
Forum: Scripting Help 27/07/2018, 08:57 PM
Replies: 23
Views: 671
Posted By AmigaBlizzard
Re: Every hour and half a hour

Run a 1 second timer to be accurate, then check if "minute" is 0 or 30 and a flag is 0.
If so, execute your stuff and set the flag to 1.

To reset the flag, add a second if-statement to check if...
Forum: Scripting Help 25/07/2018, 10:39 PM
Replies: 7
Views: 273
Posted By AmigaBlizzard
Re: Player positions not saved properly

When working with tqueries, you need to load your data using callback functions.
You can't read the data right after sending the query because there is no result yet.

Forum: Scripting Help 25/07/2018, 12:06 AM
Replies: 4
Views: 223
Posted By AmigaBlizzard
Re: Pickup from vehicle

You can also create a pickup that exists always (ID 1) but not handle that pickup using OnPlayerPickUpPickup.
Instead, create a dynamic circular area using Incognito's streamer around the pickup and...
Forum: Tutorials 22/07/2018, 10:03 AM
Replies: 27
Views: 5,321
Posted By AmigaBlizzard
Re: Properly Securing Passwords

If a hacker does a brute-force attack, it gets done using the normal OnPlayerConnect callback?
He won't be inputting every password combo by hand, but lets the computer enter it, a few thousand...
Forum: Scripting Help 21/07/2018, 07:34 AM
Replies: 20
Views: 668
Posted By AmigaBlizzard
Re: Vehicle ID's Loading in random order. MySQL R41

The problem with your current system is this (and will mess up your server big time):

You have 10 vehicles in your database for example, with ID's 1 to 10.

You delete one vehicle, let's say...
Forum: Scripting Help 10/07/2018, 06:47 PM
Replies: 16
Views: 749
Posted By AmigaBlizzard
Re: Is there a way to optimize this code?

My way turns more than 100 cents into dollars automatically.
For all other ways, you have to do it manually (check if 100 cents or more, then substract 100 from the cents and add 1 to the dollars,...
Forum: Scripting Help 09/07/2018, 11:30 PM
Replies: 16
Views: 749
Posted By AmigaBlizzard
Re: Is there a way to optimize this code?

You don't have to use 2 separate arrays to store this.
When you give the player some money like $450, give him 450 * 100 = 45000.
Then you'll be storing his money in cents instead of whole dollars....
Forum: General 06/07/2018, 01:19 PM
Replies: 24
Views: 1,914
Posted By AmigaBlizzard
Re: Ads: An Interesting Idea

I also have AdBlock on my browser and if I'm looking for information about something and I get to a website which wants me to disable my adblock, I'll happily push the backspace button and find...
Forum: General 06/07/2018, 12:51 PM
Replies: 24
Views: 1,517
Posted By AmigaBlizzard
Re: dini2 vs SQLite? (Speed)

Also, if people want to use your include (which would use MySQL), and they don't know how to use it, then they should use something else.
You can't be bothered with the fact someone might not know...
Forum: Scripting Help 04/07/2018, 02:49 PM
Replies: 16
Views: 749
Posted By AmigaBlizzard
Re: Is there a way to optimize this code?

A silly question, but why are you storing a float in a string to begin with?
String manipulations are always slower than processing the same value in a float or integer.
Forum: General 04/07/2018, 02:15 PM
Replies: 24
Views: 1,517
Posted By AmigaBlizzard
Re: dini2 vs SQLite? (Speed)

Speed isn't the only thing you should look at.

It's the same with cars.
Everyone wants to have a fast car like a Ferrari or Porsche, I don't.
You're not allowed to drive that fast anyways and...
Forum: Scripting Help 23/06/2018, 08:47 AM
Replies: 12
Views: 414
Posted By AmigaBlizzard
Re: OnDialogResponse does nothing

Did you use the same ID's in your filterscript and gamemode?
I always use ID's 1-999 in my gamemode and 1000-1999 for first filterscript, 2000-2999 for second filterscript and so on.
Then ID's...
Forum: Scripting Help 23/06/2018, 08:33 AM
Replies: 14
Views: 488
Posted By AmigaBlizzard
Re: Control Structure

Try adding some extra ( ) like this around each condition:

if((PlayerData[playerid][pFactionRank] > FactionData[PlayerData[playerid][pFaction]][factionEditrank]) || (PlayerData[playerid][pAdmin] <...
Forum: Scripting Help 14/06/2018, 09:57 PM
Replies: 12
Views: 336
Posted By AmigaBlizzard
Re: Score Update
The return value of SetPlayerScore is 1 for success and 0 for failure.

So you're setting "level" to 0 or 1 based on success or failure of using...
Forum: Scripting Help 14/06/2018, 09:50 PM
Replies: 6
Views: 200
Posted By AmigaBlizzard
Re: Disappearing vehicles

After setting the virtual world of the player and vehicle, try to use PutPlayerInVehicle and then reposition the player (SetPlayerPos) to the coordinates he should be standing.

That's how you show...
Forum: Scripting Help 14/06/2018, 09:42 PM
Replies: 6
Views: 279
Posted By AmigaBlizzard
Re: assign number automatically as array?

If you want to use that array per player to store 5 objects each per player:

new objects[MAX_PLAYERS][5];

cmd:object(playerid, params[])
objects[playerid][0] = createplayerobjectxxx
Forum: Scripting Help 14/06/2018, 11:05 AM
Replies: 11
Views: 397
Posted By AmigaBlizzard
Re: Very large amx size

You're lucky the axm size isn't bigger than 5Mb.

If you take the array-size into account:
3500 indices x (256 cells for one field, 256 cells for another field) x 4 bytes per cell = 3500 x 512 x 4...
Forum: Discussion 08/06/2018, 06:36 PM
Replies: 5
Views: 1,618
Posted By AmigaBlizzard
Re: Profiler result's -Optimization mode

I can get why you want to kick cheaters fast, but using OnPlayerUpdate is overkill.
This callback is called at least 30 times per second FOR EVERY PLAYER.
If you have 250 players online, you're...
Showing results 1 to 25 of 320


All times are GMT. The time now is 08:48 PM.

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