SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 309
Search took 0.01 seconds.
Search: Posts Made By: AmigaBlizzard
Forum: Scripting Help 10/07/2018, 06:47 PM
Replies: 16
Views: 626
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: 626
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: 25
Views: 1,073
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: 722
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: 626
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: 722
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: 336
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: 390
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: 273
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: 144
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: 233
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: 316
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,276
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...
Forum: Discussion 08/06/2018, 06:21 PM
Replies: 14
Views: 3,346
Posted By AmigaBlizzard
Re: Faster pwn compiler

Also huge switch case statements bring alot of compile-time:

switch (somevar)
case 0 .. 4999:
// Do something
case 5000 .. 9999:
Forum: Gamemode Scripts 07/06/2018, 08:55 PM
Replies: 18
Views: 2,766
Posted By AmigaBlizzard
Re: TruckSamp - V5.1.1 Turkish R41-4 PPC_Trucking V5

This is not PPC Trucking V5, there isn't even a V2 yet.
There is nothing that closely resembles PPC Trucking.
Forum: Scripting Help 05/06/2018, 06:07 PM
Replies: 12
Views: 262
Posted By AmigaBlizzard
Re: sizeof() or direct number in functions and INI saving question

Why does everyone use "stock functions"?
They're exactly the same as a normal function.
Stock doesn't add anything to your code.

It only makes sure you won't get a warning about an unused...
Forum: General 03/06/2018, 08:56 AM
Replies: 29
Views: 3,509
Posted By AmigaBlizzard
Re: Dutch SAMP Players?

I'm Dutch as well, but I'm no cheesehead, I live in Belgium.
Although I speak Dutch, everything I program is always in english, even when the tool is not released to the public.
Forum: Scripting Help 01/06/2018, 08:46 PM
Replies: 2
Views: 77
Posted By AmigaBlizzard
Re: Dialog No Response

Check all your other filterscripts for OnDialogResponse and find the one that returns 1 always, especially when a dialog that doesn't belong to that filterscript is handled (like yours).
Start with...
Forum: Scripting Help 29/05/2018, 08:42 PM
Replies: 9
Views: 182
Posted By AmigaBlizzard
Re: Run out of ammo then freeze

Do you manage the ammo from within the script itself?
Does the ammo go negative perhaps?

Add some print statements inside OnPlayerWeaponShot callback to track if ammo going negative could be a...
Forum: Scripting Help 29/05/2018, 08:38 PM
Replies: 9
Views: 156
Posted By AmigaBlizzard
Re: HELP! Cannot Creating Table MYSQL

Is it only the first one that doesn't get created, or all 4 of them?

If it's only the first, do you actually send the query after formatting to MySQL using this?

mysql_tquery(g_SQL, query, "",...
Forum: Scripting Help 29/05/2018, 08:59 AM
Replies: 2
Views: 58
Posted By AmigaBlizzard
Every class separately

Hi guys, I've got a question.

I'm thinking about creating my own gamemode and I would like to make it like an MMORPG (sort-of).
In every MMORPG, you first create a character and give that...
Forum: Scripting Help 28/05/2018, 08:00 AM
Replies: 2
Views: 78
Posted By AmigaBlizzard
Re: Problem in /heal

You can't have pMember at 14 AND 18 at the same time so the above if-statement would never work.
Try this one instead to check if it's either 14 or 18, then check if he's in an ambulance and he's...
Forum: Scripting Help 27/05/2018, 08:14 AM
Replies: 3
Views: 81
Posted By AmigaBlizzard
Re: query string length should be...?

Replace each holder (%s, %d, %i, %f, whatever) by the maximum values it can hold.
For an integer, it's -2000000000 (almost, but it's the length of the text that counts, not the value itself), so for...
Forum: Scripting Help 23/05/2018, 05:46 PM
Replies: 20
Views: 573
Posted By AmigaBlizzard
Re: button bug

Look at your server.cfg file and check ALL filterscripts in the order listed in your server.cfg file.
If there is a filterscript that always returns 1 under OnDialogResponse, remove that line or let...
Forum: General 20/05/2018, 08:34 PM
Replies: 52
Views: 5,095
Posted By AmigaBlizzard
Re: Should admins be able to see /PM's between players?

I don't know if you know Aion, but it's an MMORPG game where alot of bots are active, which farm the monsters 24/7.
Those bots offer ingame money to players via pm's for real money, which is clearly...
Showing results 1 to 25 of 309


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

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