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: Grim_
Forum: Scripting Help 26/05/2020, 10:48 PM
Replies: 10
Views: 277
Posted By Grim_
Re: Lock/Unlock OnPlayerKeyStateChange

You need to put the code in the callback..

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_JUMP)
{
if (MegaJump[playerid] == 1)
{
new Float:Jump[3];...
Forum: Scripting Help 26/05/2020, 03:47 PM
Replies: 1
Views: 132
Posted By Grim_
Re: sscanf warning: String buffer overflow.

It's being called somehow at those intervals. If you can't think of where it's coming from, you'll just need to debug every sscanf call to find out.
Forum: Scripting Help 26/05/2020, 03:44 PM
Replies: 10
Views: 277
Posted By Grim_
Re: Lock/Unlock OnPlayerKeyStateChange

Post your whole OnPlayerKeyStateChange callback.
Forum: Scripting Help 26/05/2020, 03:42 PM
Replies: 33
Views: 1,057
Posted By Grim_
Re: Data being reset when connecting to server.

Is it actually being saved to the file correctly? If so, debug the file loading function to see what values are being read to see if your issue is there.
Forum: Scripting Help 25/05/2020, 09:05 PM
Replies: 8
Views: 187
Posted By Grim_
Re: Using GetVehiclePoolSize doesn't catch all the veh's

No.

Attach3DTextLabelToVehicle returns 0 when the vehicle or label is not valid. I found this...might be worth a peek
https://forum.sa-mp.com/showthread.php?t=538375

EDIT: Is the vehicle ID...
Forum: Scripting Help 25/05/2020, 08:56 PM
Replies: 10
Views: 277
Posted By Grim_
Re: Lock/Unlock OnPlayerKeyStateChange

I won't code it for you, but will help. Post your code with the error lines noted. It still seems you have an extra bracket.
Forum: Scripting Help 25/05/2020, 08:53 PM
Replies: 3
Views: 118
Posted By Grim_
Re: Question about includes & some type of reloading

Short answer: Includes are dumped into your main gamemode script line-for-line at compile. So no.
Forum: Scripting Help 25/05/2020, 08:50 PM
Replies: 8
Views: 216
Posted By Grim_
Re: how to make command A to command B

If you want them to be the same command..

if(strcmp(cmdtext, "/a", true) == 0 || strcmp(cmdtext, "/b", true) == 0)


Or if you want to perform some actions in /a, then call /b:
...
Forum: Scripting Help 25/05/2020, 08:44 PM
Replies: 10
Views: 385
Posted By Grim_
Re: ProgressBar blank

Can you link me to the library you're using? I found multiple versions when searching.
Forum: Scripting Help 25/05/2020, 08:41 PM
Replies: 8
Views: 187
Posted By Grim_
Re: Using GetVehiclePoolSize doesn't catch all the veh's

I made some test code using the non streamer version and it worked correctly. Replace the code inside your foreach loop with this and let me know what you get.

printf("vehID = %i, playerID = %i",...
Forum: Scripting Help 25/05/2020, 08:20 PM
Replies: 10
Views: 277
Posted By Grim_
Re: Lock/Unlock OnPlayerKeyStateChange

What errors are you getting?

You need to use bit operations for keys. Information regarding that can be found on the wiki.

if(newkeys & KEY_CROUCH)



if(PlayerCar[playerid] != -1)
...
Forum: Scripting Help 25/05/2020, 01:03 AM
Replies: 13
Views: 323
Posted By Grim_
Re: Timers messing me up

getdate() + 3600
Forum: Scripting Help 25/05/2020, 12:50 AM
Replies: 6
Views: 212
Posted By Grim_
Re: Rent Sytem

What errors are you getting..?
Forum: Scripting Help 25/05/2020, 12:47 AM
Replies: 8
Views: 187
Posted By Grim_
Re: Using GetVehiclePoolSize doesn't catch all the veh's

You are trying to attach a dynamic 3D text label, which after looking up documentation, I could only find you can do during it's creation with the .attachedvehicle parameter.

ExplodedTXT[x] =...
Forum: Scripting Help 25/05/2020, 12:29 AM
Replies: 10
Views: 385
Posted By Grim_
Re: ProgressBar blank

I'm not familiar with the library, but is the value returned from GetPlayerProgressBarValue correct? I'm assuming when you debugged you were checking the value of the TimeLeft variable.
Forum: Scripting Help 24/05/2020, 06:16 PM
Replies: 5
Views: 194
Posted By Grim_
Re: what's the problem with this string?

Test code working..

main() {
Test("01234567890123456789 spune: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46");...
Forum: Scripting Help 24/05/2020, 05:42 PM
Replies: 6
Views: 212
Posted By Grim_
Re: Rent Sytem

if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver
{
// code should be here
}

You're not putting the checks inside your...
Forum: Scripting Help 23/05/2020, 08:30 PM
Replies: 4
Views: 171
Posted By Grim_
Re: help

You made a slot machine system, using tags, but can't fix that warning, hmm. Can you see what it says?
Forum: Scripting Help 23/05/2020, 08:27 PM
Replies: 11
Views: 248
Posted By Grim_
Re: Need help understanding how pwn works

What DRIFT_HUNTER said. Return values are also optional, with the exception of public functions. So just exclude the return clause unless it is needed.


// No return value necessary, no...
Forum: Scripting Help 23/05/2020, 08:04 PM
Replies: 1
Views: 93
Posted By Grim_
Re: Car mods not saving.

Your query has three placeholders, but you're only passing two variables. The MySQL plugin creates a log file which outputs any errors, including failed queries.
Forum: Scripting Help 22/05/2020, 04:29 PM
Replies: 8
Views: 288
Posted By Grim_
Re: sqlite problem

format(Query, sizeof(Query), "UPDATE users SET `POSX` = %f, `POSY` = %f, `POSZ` = %f admin = %d, Premium = %d, money = %d, kills = %d, deaths = %d,",posx, posy, posz, User[playerid][USER_ADMIN],...
Forum: Scripting Help 22/05/2020, 04:23 PM
Replies: 1
Views: 103
Posted By Grim_
Re: Problem Locating my Veh

Are you getting any of the client messages? Verify PlayerInfo[playerid][pAvto1] is a valid vehicle id.
Forum: Scripting Help 22/05/2020, 04:17 PM
Replies: 13
Views: 387
Posted By Grim_
Re: OnDialogResponse

Show your definition of DIALOG_SHOP, and where you are showing that dialog with ShowPlayerDialog(). Your IDs are mixed somewhere.
Forum: Scripting Help 22/05/2020, 04:12 PM
Replies: 2
Views: 120
Posted By Grim_
Re: problem at pin system

Which lines are which...?
Forum: Scripting Help 22/05/2020, 04:08 PM
Replies: 10
Views: 320
Posted By Grim_
Re: Delete3DTextLabel is not working?

Add a print above the DestroyDynamic3DTextLabel call to verify that it is being called. Only thing that would be obvious is that listitem 1 is not being selected.
Showing results 1 to 25 of 500

 

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


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