SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 121
Search took 0.01 seconds.
Search: Posts Made By: AdamsLT
Forum: Scripting Help 29/02/2020, 08:48 PM
Replies: 5
Views: 220
Posted By AdamsLT
Re: DynamicObject Positioning

IsPointInDynamicArea(areaid, Float:x, Float:y, Float:z)

Pass the area ID and the coordinates of the object.
It will check if the object is inside of the area. You can invert this to get if the...
Forum: Scripting Help 29/02/2020, 08:33 PM
Replies: 3
Views: 169
Posted By AdamsLT
Re: MySQL Event

Callbacks are optional for threaded queries.

As for the issue, that's not how it should be used. If you want to format a string, use mysql_format. The format in tquery is for the callback function...
Forum: Scripting Help 18/02/2020, 06:49 PM
Replies: 2
Views: 168
Posted By AdamsLT
Re: Setting Vehicle Logos

Nope. These are not controllable server-side. :(
You could attach some objects to cover them and then draw what you like on them by changing the textures/texture text, if that helps.
Forum: Scripting Help 18/09/2019, 05:43 PM
Replies: 8
Views: 324
Posted By AdamsLT
Re: Getting ammo of holding weapon

You could try syncing it using the OnPlayerWeaponShot callback.

1ms timer wouldn't be too drastic but it will likely not need to update most of the time so it isn't quite optimal.
Forum: Scripting Help 18/09/2019, 05:31 PM
Replies: 8
Views: 324
Posted By AdamsLT
Re: Getting ammo of holding weapon

live_timer[playerid] = SetTimerEx("liveammo", 100, true, "i", playerid, id);
Is wrong, you missed 1 extra i inside of your timer

live_timer[playerid] = SetTimerEx("liveammo", 100, true, "ii",...
Forum: Client Support 29/04/2019, 03:34 PM
Replies: 2
Views: 457
Posted By AdamsLT
Re: Huge screensgot lag

Try to empty the screenshot folder.

I find that if I have it almost filled (900+ photos), the lag is noticeable for the first pic and then it disappears for the following photos if I don't turn...
Forum: Scripting Help 18/04/2019, 02:29 PM
Replies: 2
Views: 201
Posted By AdamsLT
Re: Vehicle positions

Your SQL query saves the data for ALL vehicles, that are owned by player named XXX_YYY

Specifically this part:
WHERE owner = '%s'" ,

Your vehicles need a unique identifier and you need to use...
Forum: Scripting Help 16/04/2019, 07:44 AM
Replies: 4
Views: 416
Posted By AdamsLT
Re: Respawn All Vehicles

Normally I ignore those code suggestions but I can't.
DON'T use that code, wtf. It's awful.



It depends on functions: LOOP_PLAYERS(), LevelCheck(), GetPlayerGAdminLevel(), ReturnPlayerName()...
Forum: Scripting Help 15/04/2019, 10:11 PM
Replies: 4
Views: 416
Posted By AdamsLT
Re: Respawn All Vehicles

You need to use foreach for this is. That way you won't need to loop over unused vehicleids so this loop will become a lot quicker.

But even then, lagging for 10 seconds seems unusually long. Are...
Forum: Screenshots and Videos 25/03/2019, 10:09 PM
Replies: 4
Views: 1,081
Posted By AdamsLT
Re: Map Concept - "Natural" garages

Thanks. You are correct about the weather.

Here is an idea to address the issue:
Incognitos streamer has a way to define areas and then callbacks for when people enter/exit them. So...
Make...
Forum: Screenshots and Videos 25/03/2019, 08:57 PM
Replies: 4
Views: 1,081
Posted By AdamsLT
Map Concept - "Natural" garages

So the idea is to use already existing garages in place of mapping new ones underground, playing with virtual worlds, interiors, etc.

This is not a showcase of a perfect map but an idea of how...
Forum: Scripting Help 03/03/2019, 02:22 PM
Replies: 1
Views: 147
Posted By AdamsLT
Re: Wrong date

It's because you mixed up your getdate() function.

It should be:
getdate(year, month, day);
Forum: Scripting Help 03/03/2019, 11:38 AM
Replies: 16
Views: 551
Posted By AdamsLT
Re: Siren

Your CreateVehicle line is fine. Maybe the problem isn't on the server.

Here is some things that you can consider trying out:

Do you hear any sound at all after you press H? Maybe you unbound...
Forum: Scripting Help 03/03/2019, 11:21 AM
Replies: 5
Views: 295
Posted By AdamsLT
Re: WTF? 0.3.7 Siren not working

Your code works. I literally just copy-pasted it ant tried it out on a Sultan.

One problem that I fixed:
if(GetPlayerVehicleID(playerid) == INVALID_VEHICLE_ID) return...
Forum: Scripting Help 24/02/2019, 01:25 PM
Replies: 5
Views: 239
Posted By AdamsLT
Re: Phone system help!

You would need to query the list of phone numbers in your database. Something like this:

"SELECT COUNT(*) FROM `accounts` WHERE `PhoneNumber` = '%i'"
Format this string and insert your newly...
Forum: Scripting Help 24/02/2019, 01:05 PM
Replies: 5
Views: 239
Posted By AdamsLT
Re: Phone system help!

If you want a minimum value, then you have to start at that value and generate only how much is missing from your max.
In your code it would be:
new rand = 10_000 + random(90_000);

I would...
Forum: Scripting Help 24/02/2019, 01:03 PM
Replies: 2
Views: 235
Posted By AdamsLT
Re: help please

Well, as the error suggests, it seems like you don't have a function named adminchat
You should probably see if it can be accessed from this include, if it even exists, etc.

Also, you errors...
Forum: Scripting Help 24/02/2019, 12:35 PM
Replies: 2
Views: 447
Posted By AdamsLT
Re: Speed?

AFAIK the vehicle must be moving, otherwise you can't really change the speed (or I might be forgetting about something).
Surely it won't be problematic to ask your players to move a little bit?
...
Forum: Scripting Help 20/02/2019, 11:11 PM
Replies: 7
Views: 338
Posted By AdamsLT
Re: IsPlayerConnected problem

Also, the IsPlayerConnected check should be above the pData[targetID][pIsLoggedIn] check, shouldn't it?
Because if you receive an Invalid Player ID with sscanf, then you will have an error when...
Forum: Screenshots and Videos 13/02/2019, 06:00 PM
Replies: 73
Views: 14,433
Posted By AdamsLT
Re: WTLS Updates

You wouldn't need to remodel the object, you can simply texture the windows with blank textures and they will be invisible. Then you can place some walls inside to make it look like a small room and...
Forum: Scripting Help 13/01/2019, 07:40 PM
Replies: 6
Views: 329
Posted By AdamsLT
Re: Underwater Tunnel Problem

AFAIK spawning a car deeper underwater will make it ignore the water effect.
Toggling spectating for a player on and off while the player is swimming underwater will make them ignore the water...
Forum: Scripting Help 10/12/2018, 07:41 AM
Replies: 3
Views: 255
Posted By AdamsLT
Re: Help me solve this problem!

I suspect you have forgotten a closing bracket or added one too many.
I believe the problem is not in this specific code snippet but above it.

You should look at the code above this. Did you...
Forum: Scripting Help 28/07/2018, 03:47 PM
Replies: 2
Views: 333
Posted By AdamsLT
Re: Textdraw when player aproaches door.

If you use Incognito's streamer, then you can create dynamic areas around the houses and when somebody is close enough, have the textdraw displayed,
...
Forum: Scripting Help 28/07/2018, 03:33 PM
Replies: 2
Views: 311
Posted By AdamsLT
Re: Server Crashed Help me !!

It seems that you tried to write to an array at an index that is above the size of said array?

Trying to do everything with the crashdetect plugin and the gamemode compiled with the -d3 flag would...
Forum: Scripting Help 20/07/2018, 09:41 AM
Replies: 2
Views: 300
Posted By AdamsLT
Re: Help me Playerid

format(string, sizeof(string), "(( Ban dang bi thuong, /damages %d de biet them thong tin. ))");

In this line you format the string but forget to insert anything inside of the %d placeholder.
...
Showing results 1 to 25 of 121

 

All times are GMT. The time now is 01:02 AM.


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