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: Threshold
Forum: Scripting Help 15/01/2020, 06:51 AM
Replies: 11
Views: 329
Posted By Threshold
Re: How to restart such variables?

saffierr has a perfectly logical alternative. There is no 'new' or 'old' method, they both do the same thing.
I myself would much rather set variables OnPlayerConnect instead of resetting them when...
Forum: Scripting Help 14/01/2020, 04:10 AM
Replies: 10
Views: 227
Posted By Threshold
Re: Updating 3D text label makes it dissapear

That's probably because you never reset the value of 'RevivingText[playerid]'. This value should be reset whenever the label is deleted, which should be when the player disconnects, the gamemode...
Forum: Scripting Help 16/12/2019, 12:46 PM
Replies: 13
Views: 244
Posted By Threshold
Re: Convert

Try destroying the vehicles instead of hiding them..
Forum: Scripting Help 14/12/2019, 04:09 AM
Replies: 2
Views: 146
Posted By Threshold
Re: Anti money hack

If you don't want your players to be able to use money cheats, then stop relying on 'GetPlayerMoney'. Use the variable that you created for this exact purpose instead, Player[playerid][pDinheiro].
Forum: Scripting Help 14/12/2019, 04:04 AM
Replies: 1
Views: 95
Posted By Threshold
Re: [STRCMP] Returning wrong value

Take note that 'Strcmp' will return 0 if either of the two strings is empty. If pName returns an empty string or clanArrayData does not hold a string, then strcmp will basically act as if both the...
Forum: Scripting Help 19/09/2019, 04:03 PM
Replies: 17
Views: 482
Posted By Threshold
Re: Bot help [meh sorry]

A better solution would be to use OnPlayerConnect so you don't have to handle with finding the NPC's player ID, or alternatively you can just save the NPC's ID to a global variable when it connects,...
Forum: Scripting Help 05/09/2019, 09:48 AM
Replies: 8
Views: 268
Posted By Threshold
Re: Gamemode Errors Need Guide

Does anyone realise that these variables are useless and aren't actually doing anything?
'TeleportEvent' and 'Pos' are never being used.
Forum: Scripting Help 05/09/2019, 09:44 AM
Replies: 8
Views: 151
Posted By Threshold
Re: Y_ini not load data

You are trying to load from a user file with the tag 'Data', which apparently does not exist. So there are two options here.

Use INI_SetTag when writing to the file, making the tag match what you...
Forum: Scripting Help 05/09/2019, 09:32 AM
Replies: 18
Views: 596
Posted By Threshold
Re: Progress bar

I'm assuming you're using the progress2 (https://github.com/Southclaws/progress2) include.

Within this library there are 2 functions:
SetPlayerProgressBarValue(playerid, PlayerBar:barid,...
Forum: Scripting Help 03/09/2019, 04:34 PM
Replies: 18
Views: 596
Posted By Threshold
Re: Progress bar

What are the values of 'exp_req' and 'exp_cur' in that instance?

EDIT: Also forgot to mention, the max value for the progress bar with my code should be 100.0, not 1.0.
I'm using a literal...
Forum: Scripting Help 31/08/2019, 09:55 AM
Replies: 18
Views: 596
Posted By Threshold
Re: Progress bar

UpdateExpBar(playerid)
{
new
exp_req = (ReturnPlayerLevel(playerid) * 4),
exp_cur = ReturnPlayerExp(playerid)
;
SetPlayerProgressBarValue(playerid, LevelBar[playerid], (exp_req >...
Forum: Scripting Help 30/08/2019, 10:08 AM
Replies: 11
Views: 376
Posted By Threshold
Re: TextDraws Keep Stacking

Did you ever think that perhaps your code was not perfect? Because I can assure you, it's not.

If a user wants to post because they believe they are further contributing to solving an issue, then...
Forum: Scripting Help 29/08/2019, 08:45 AM
Replies: 16
Views: 450
Posted By Threshold
Re: Retrieve Multiple Rows from MySQL

You never assigned a value to 'rows', so it was only going through one iteration.

rows = cache_num_rows();
Forum: Scripting Help 28/08/2019, 10:50 AM
Replies: 15
Views: 330
Posted By Threshold
Re: Change password

Are you really storing passwords in plain text?

Don't.

https://forum.sa-mp.com/showthread.php?t=581336
Forum: Scripting Help 30/07/2019, 12:01 PM
Replies: 4
Views: 188
Posted By Threshold
Re: Count passengers

Assuming 'vehicleid' is a valid vehicle ID, this would make no difference.

If this code is returning 0, it's more than likely because 'vehicleid' is incorrect.
Forum: Scripting Help 07/07/2019, 11:19 AM
Replies: 8
Views: 324
Posted By Threshold
Re: Cheater IP

GPCI is also very likely to affect innocent players, especially if you're banning a specific GPCI where it can affect thousands of players.



It's actually easier to change your client ID than...
Forum: Scripting Help 26/06/2019, 02:31 PM
Replies: 5
Views: 224
Posted By Threshold
Re: AudioStream

https://wiki.sa-mp.com/wiki/PlayerPlaySound
??

https://wiki.sa-mp.com/wiki/PlayAudioStreamForPlayer
PlayAudioStreamForPlayer also has coordinate parameters to allow for streams to be played in...
Forum: Scripting Help 21/06/2019, 06:00 AM
Replies: 1
Views: 128
Posted By Threshold
Re: OnPlayerDisconnect

You're not resetting the variables 'cone' and 'stop'. So they retain their values.

public OnPlayerDisconnect(playerid, reason)
{

if(IsValidDynamicObject(cone[playerid])...
Forum: Scripting Help 02/06/2019, 02:26 PM
Replies: 2
Views: 99
Posted By Threshold
Re: checking player with vehicle pos

This has been documented many times. Make use of the search function, that's what it's there for.

https://forum.sa-mp.com/showpost.php?p=1957918&postcount=7
Forum: Scripting Help 26/05/2019, 08:59 AM
Replies: 2
Views: 166
Posted By Threshold
Re: Server crashed when connected

It seems that fclose might be causing an issue here, so you're likely not using a valid handle. If you don't believe this is the issue, show us your OnPlayerConnect.
Forum: Scripting Help 23/05/2019, 02:17 PM
Replies: 7
Views: 254
Posted By Threshold
Re: How to check the highest value variable?

Please check your work before posting... or at least test run it when someone questions it...
Forum: Scripting Help 22/05/2019, 08:00 AM
Replies: 12
Views: 409
Posted By Threshold
Re: Buyvehicle

Potentially this:
VehicleNames[id-400]

I'm assuming you're supposed to get the model ID of the vehicle and subtract 400, not subtract from the vehicle ID.

VehicleNames[GetVehicleModel(id) -...
Forum: Scripting Help 22/05/2019, 05:34 AM
Replies: 4
Views: 149
Posted By Threshold
Re: Another problem

You need to give your 'id' column a 'Unique' constraint. You can do this by either making the 'id' a primary key or unique.

https://www.w3schools.com/sql/sql_unique.asp

Upon doing this, every...
Forum: Scripting Help 22/05/2019, 05:24 AM
Replies: 7
Views: 254
Posted By Threshold
Re: How to check the highest value variable?

And what exactly do you guys think the value of 'allPoints[-1]' would be?

This would just generate an out of bounds error.
Forum: Scripting Help 21/05/2019, 02:56 PM
Replies: 8
Views: 240
Posted By Threshold
Re: How to grouping? 10 pcs equals 1 box

Number of carrots / Number of carrots per crate = Number of crates needed

???

20 / 10 = 2
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 06:18 AM.


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