SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: Vince
Forum: Scripting Help 15/09/2017, 10:18 PM
Replies: 7
Views: 215
Posted By Vince
Re: Hexadecimal save

There is no need to convert between decimal and hexadecimal because there is nothing to convert. It's the same number. Just fetch and store with the regular Int functions like you would any other...
Forum: Scripting Help 15/09/2017, 09:55 PM
Replies: 7
Views: 215
Posted By Vince
Re: Hexadecimal save

Like any other integer value. They might come out looking like -15786300 or something like that but that's normal. The reason you can use -1 in SendClientMessage to get white is that -1 is exactly...
Forum: Everything and Nothing 15/09/2017, 11:38 AM
Replies: 29
Views: 925
Posted By Vince
Re: Boring ? im bored!

Tax reasons.
Forum: Scripting Help 15/09/2017, 11:07 AM
Replies: 3
Views: 206
Posted By Vince
Re: Tag mismatch

Restructure your array so that it looks like this:
P_CHEMICAL[playerid][id][Amount]

Also you shouldn't name regular variables in all caps; identifiers in all caps are usually reserved for...
Forum: Scripting Help 14/09/2017, 05:47 PM
Replies: 6
Views: 161
Posted By Vince
Re: MYSQL Right syntax for this

Hmm, are you trying to add two identical rows together? Same player, same item id? Because I'm not quite grasping the context.

What you should probably do is:
a) remove the id field and the keys...
Forum: Scripting Help 14/09/2017, 05:15 PM
Replies: 6
Views: 161
Posted By Vince
Re: MYSQL Right syntax for this

Oh. Uhm, well it is a rather strange query. Do you mind showing your data structure? Perhaps there is better way to do it.
Forum: Scripting Help 14/09/2017, 04:09 PM
Replies: 6
Views: 161
Posted By Vince
Re: MYSQL Right syntax for this

A subquery needs to be a full fledged query.

UPDATE `player_inventory` SET `amount` = `amount` + (SELECT `amount` FROM player_inventory WHERE `id` = %d) WHERE `id` = %d

And oh, don't use...
Forum: Scripting Help 14/09/2017, 03:14 PM
Replies: 5
Views: 131
Posted By Vince
Re: Need help to remove some buildings

Does it remove the LOD model as well, i.e. does it produce two different RemoveBuilding lines? The LOD model (Low Object Detail) is displayed when you're farther away than 300 meters.
Forum: Scripting Help 14/09/2017, 03:08 PM
Replies: 10
Views: 521
Posted By Vince
Re: hash password with md5

MD5 has been proven insecure. Use the inbuilt SHA256_PassHash() function instead.
Forum: Scripting Help 14/09/2017, 02:32 PM
Replies: 15
Views: 464
Posted By Vince
Re: Return CMD

You put all the contents of that command in a separate function and then you call that function from wherever you want. Return cmd_ is, IMO, a poor design choice.
Forum: Scripting Help 14/09/2017, 01:47 PM
Replies: 5
Views: 131
Posted By Vince
Re: Need help to remove some buildings

See this thread: http://forum.sa-mp.com/showthread.php?t=360408
Forum: Server Support 14/09/2017, 12:03 PM
Replies: 10
Views: 474
Posted By Vince
Re: Crash on restart

In what language is it customary to start every damn word with a capital letter? It's even more annoying to read than all caps.

Make sure that you close the MySQL connection in OnGameModeExit.
Forum: Screenshots and Videos 14/09/2017, 09:44 AM
Replies: 16
Views: 1,417
Posted By Vince
Re: Boat Interior

It seems too big to represent the interior of such a small boat. But it could be used for other purposes. Perhaps as a hotel room or even a hospital room.
Forum: Everything and Nothing 13/09/2017, 11:34 PM
Replies: 30
Views: 1,213
Posted By Vince
Re: Best Forum Software?

Invision Power is the same thing. Once bought, you can use it forever. The only nuisance is that you don't have access to the downloads if your support license has expired. I think you still receive...
Forum: Scripting Help 13/09/2017, 09:07 PM
Replies: 2
Views: 261
Posted By Vince
Re: cache_get_value_name: no active cache

I don't know how you expect this to work without sending a query first.
Forum: Scripting Help 13/09/2017, 04:41 PM
Replies: 5
Views: 92
Posted By Vince
Re: Textdraws

Do you also destroy the textdraw when the player disconnects? PlayerTextDraw is automatically destroyed on disconnect, regular TextDraw is NOT. I think you're hitting the limit which prevents any...
Forum: Scripting Help 13/09/2017, 04:34 PM
Replies: 3
Views: 114
Posted By Vince
Re: oban

This is very confusing to read. I can also see several issues but none seem to be directly related.

1) Your queries are vulnerable to SQL injection because you're not escaping user input. Use...
Forum: Scripting Help 13/09/2017, 01:21 PM
Replies: 6
Views: 165
Posted By Vince
Re: Label help

Colors are numbers not text. They just happen to be presented in hexadecimal (base 16) instead of decimal (base 10) most of the time because that's easier to read; each color component (red, green,...
Forum: Everything and Nothing 13/09/2017, 01:02 PM
Replies: 30
Views: 1,213
Posted By Vince
Re: Best Forum Software?

This has already been discussed countless times. vBulletin used to be the standard, but no longer. Quality suffered greatly when IB took over Jellsoft. They also charge you for every upgrade unlike...
Forum: Scripting Help 13/09/2017, 09:57 AM
Replies: 4,485
Views: 461,829
Posted By Vince
Re: Little coding questions - For general minor queries 5

You mean a "wildcard"? An underscore matches exactly one character (not zero or one, just one) and the percent symbol matches zero or more characters....
Forum: Scripting Help 13/09/2017, 09:36 AM
Replies: 5
Views: 186
Posted By Vince
Re: Check if the player is using Dialog

You can use this: https://pastebin.com/MG7sgr8V
It's not advanced at all, so I don't mind. I wrote this in 5 minutes a few days ago when I needed something similar. It basically the same idea that...
Forum: Scripting Help 13/09/2017, 09:25 AM
Replies: 11
Views: 156
Posted By Vince
Re: CreateDynamicObject doesnt create object.

If you add a new streamed entity in the immediate vicinity of the player then it will not be streamed until you leave the area and come back. The plugin divides the map in cells (imagine a large grid...
Forum: Everything and Nothing 13/09/2017, 09:12 AM
Replies: 7
Views: 438
Posted By Vince
Re: Forum time:

No, it's definitely the server time. I've noticed it before as well. If not synced with an NTP server then the clock goes off sync by 30 seconds a month or so. Judging by the offset the server time...
Forum: Server Support 12/09/2017, 05:09 PM
Replies: 11
Views: 521
Posted By Vince
Re: Nobody can connect to my server hosted at OVH

Perhaps a broad generalization but it seems only people who only have a vague idea about what they're doing use Windows Server as a game server. Windows Server is great in a business setting where...
Forum: Scripting Help 12/09/2017, 11:16 AM
Replies: 18
Views: 330
Posted By Vince
Re: warnings

You're not including ZCMD or Pawn.CMD.
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 03:00 PM.


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