Search Results
if the vehicles health reaches 250, set it to 300 and turn the engine off, that's what I do.
pawn Код:
new Float:Health, engine, lights, alarm, doors, bonnet, boot, objective;for(new a = 0; a <...
132
Don't use set timer... use GetTickCount.
259
There are many more valid weather IDs, but there's not much use to this as it doesn't make invalid checks faster, just easier to read I guess, but good effort anyway.
753
You should read the sscanf thread, it tells you what each specifier does...
p is to specify a deliminator, when it finds that character you specified, it will move onto the next parameter.
I'm not to...
341
I would to be safe, but you don't need to.
There's always somebody trying to do something bad.
201
When you use the string placeholder in your query, it's a good idea to use mysql_real_escape to stop injections, so if you have 3 string placeholders, I would make escape all 3 strings to be safe.
Yo...
201
What do you mean by neat? I think that's personal because every scripter has a different style.
A couple of things that might help you though.
Код:
SELECT * FROM `players` WHERE `id`=%d LIMIT 1
...
341
MAX_PLAYERS is not your server player limit, it's just a constant.
Replace MAX_PLAYERS with GetMaxPlayers(), this will return your server.cfg value for max_players.
https://sampwiki.blast.hk/wiki/Ge...
257
Why create an array and put position checks under OnPlayerKeyStateChange (which is probably called alot) when you can just remove a certain model ID?
296
You can use the new 0.3d function RemoveBuilding.
https://sampwiki.blast.hk/wiki/RemoveBuildingForPlayer
You will have to find the vending machine IDs...
https://sampwiki.blast.hk/wiki/Game_Object_...
296
Yeah, but the value subracted from the Y coordinate would have to be different for every vehicle, a premier and a yosemite will have two different offsets, probably substantially more than the premier...
524
itterate through all vehicles and use IsPlayerInRangeOfPoint to check if the player is near the vehicle. I don't think there is a way to check if he is near part of the vehicle specifically without ma...
524
return 0 under OnPlayerText, or return a message that says something along the lines of: "Type /c <text> to chat."
https://sampwiki.blast.hk/wiki/OnPlayerText
295
If it's dissapearing, Destroy3DTextLabel is being used somewhere, use CTRL+F to find it, in your gamemode and any filterscripts/includes you're using. There might be an ID mixup.
Also, try changing t...
316
Sorry double post. Thought you could delete posts.
366
I didn't ask what is better, if I wanted to use files, I would.
MySQL is simply the best all round in my opinion, can be displayed on a website, faster than SQLite and it has awesome functionality. W...
366
I'm running it on a server hosted in england, but the mysql host is in Dallas.
Doesn't that sound stupid, we aint keeping this Dallas based VPS
366
Hi guys,
My vehicle ownership engine saves automatically when the game mode is shut down, to save, it references the array index to figure out which mysql row to edit, the mysql table has a column ca...
366
Ooh, hm... maybe it is an object, I think there is a snow object from the liberty city interior, you'd have to check in a map editor...
196
You have to use an escape character..
Normal:
pawn Код:
format(something, sizeof(something), "Something is HERE");
And split into two lines:
pawn Код:
format(something, sizeof(something), "S...
180