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, 09:18 PM
Replies: 7
Views: 293
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, 08:55 PM
Replies: 7
Views: 293
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, 10:38 AM
Replies: 29
Views: 1,207
Posted By Vince
Re: Boring ? im bored!

Tax reasons.
Forum: Scripting Help 15/09/2017, 10:07 AM
Replies: 3
Views: 226
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, 04:47 PM
Replies: 6
Views: 192
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, 04:15 PM
Replies: 6
Views: 192
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, 03:09 PM
Replies: 6
Views: 192
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, 02:14 PM
Replies: 5
Views: 174
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, 02:08 PM
Replies: 10
Views: 1,411
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, 01:32 PM
Replies: 15
Views: 561
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, 12:47 PM
Replies: 5
Views: 174
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, 11:03 AM
Replies: 10
Views: 563
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, 08:44 AM
Replies: 16
Views: 2,156
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, 10:34 PM
Replies: 30
Views: 1,602
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, 03:41 PM
Replies: 5
Views: 126
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, 03:34 PM
Replies: 3
Views: 155
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, 12:21 PM
Replies: 6
Views: 200
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, 12:02 PM
Replies: 30
Views: 1,602
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, 08:57 AM
Replies: 4,533
Views: 496,984
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, 08:36 AM
Replies: 5
Views: 230
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, 08:25 AM
Replies: 11
Views: 209
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, 08:12 AM
Replies: 7
Views: 549
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, 04:09 PM
Replies: 11
Views: 601
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, 10:16 AM
Replies: 18
Views: 400
Posted By Vince
Re: warnings

You're not including ZCMD or Pawn.CMD.
Forum: Scripting Help 12/09/2017, 10:01 AM
Replies: 5
Views: 222
Posted By Vince
Re: dialog log server ?

Are you sure about that? Enum specifiers are constants, not variables. They also have the added benefit that an ID is never used twice and that you can reorder the specifiers without having to change...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 12:35 PM.


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