SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 61
Search took 0.01 seconds.
Search: Posts Made By: Chyakka
Forum: Plugin Development 29/05/2020, 01:07 AM
Replies: 44
[Plugin] Bcrypt
Views: 26,025
Posted By Chyakka
Re: Bcrypt

Just a note for anyone that may face difficulties similar to me:

Running Ubuntu 19.04, v2.2.4 refused to execute any of the callbacks, no errors no nothing. v2.2.3 works completely fine however.
Forum: Scripting Help 18/09/2019, 11:42 PM
Replies: 5
Views: 249
Posted By Chyakka
Re: help with error 029: invalid expression, assumed zero

When you reference an entire array after it's declared you don't need to provide the []

so

RouteEditor.NameCallBack(playerid, dialogid, response, listitem, inputtext[]);


would just be
Forum: Scripting Help 23/01/2019, 01:14 PM
Replies: 1
Views: 189
Posted By Chyakka
Re: Problem with inputtext value from factions dialog

Well the issue is you check

if(!isnull(FactionInfo[i][fName])) {


While this is completely valid it means that your listitem can very easily be different to the ID of the 'faction' you're...
Forum: Scripting Help 19/01/2019, 12:59 PM
Replies: 2
Views: 288
Posted By Chyakka
Re: MySQL ID

If you just run the insert query like normal you can use the LAST_INSERT_ID mysql function to get the ID of it, don't think there's any reason for it to not work on the samp mysql plugin.
Forum: Scripting Help 19/01/2019, 12:47 PM
Replies: 3
Views: 258
Posted By Chyakka
Re: /kick for certain time.

You could create a new variable in the player info enum for kick time and utilize

Info[id][newkickvariable] = gettime()+240; //4 minutes

when you kick them, save it to a database and when they...
Forum: Scripting Help 17/01/2019, 03:30 PM
Replies: 5
Views: 415
Posted By Chyakka
Re: Help furniture

I believe he means in this code:
pc LoadFurnitures()
{
new objects = 0;
Total_FUR_Created = cache_num_rows();
new i,x;
for(i=0;i<Total_FUR_Created;i++)
{
objects...
Forum: Scripting Help 15/01/2019, 07:59 PM
Replies: 9
Views: 235
Posted By Chyakka
Re: [Help] MySQL Erros

What mysql plugin are you using and what version is it?
Forum: Scripting Help 15/01/2019, 07:50 PM
Replies: 9
Views: 235
Posted By Chyakka
Re: [Help] MySQL Erros

Is your 'IDConexao' variable declared as a mysql variable?

When you make your variable you need to make sure it has the prefix MySQL:, so your variable would be:

new MySQL:IDConexao;
Forum: Scripting Help 15/01/2019, 05:54 PM
Replies: 2
Views: 198
Posted By Chyakka
Re: warning 202: number of arguments does not match definition

You're passing two seperate arguments for the contents of the dialog.


"Item\tCost(zCoins)", "AK-47\t7\n\
M4A1\t7\n\
MP5-K\t6\n\
...
Forum: Scripting Help 12/01/2019, 05:50 PM
Replies: 5
Views: 310
Posted By Chyakka
Re: How to kick all players with the same IP after banning someone?

You could get the IP of the person you've just banned, run a foreach loop through all the players, compare if they have the same IP of the person you've just banned and if so kick them/ban them do...
Forum: Scripting Help 09/01/2019, 10:06 PM
Replies: 9
Views: 301
Posted By Chyakka
Re: Tuning, paintjobs etc. places - disable

I've had a little look around and haven't found anything that could directly solve your issue but you could make use of the OnVehicleMod callback and just return 0; informing the player they cannot...
Forum: Scripting Help 09/01/2019, 08:36 PM
Replies: 9
Views: 301
Posted By Chyakka
Re: Tuning, paintjobs etc. places - disable

So what specifically in that code is not running?
Forum: Scripting Help 09/01/2019, 08:10 PM
Replies: 9
Views: 301
Posted By Chyakka
Re: Tuning, paintjobs etc. places - disable

Is
SendClientMessage(playerid, C_RED, "You cannot modify this car!");
being sent?
Forum: Scripting Help 09/01/2019, 07:42 PM
Replies: 9
Views: 301
Posted By Chyakka
Re: Tuning, paintjobs etc. places - disable

Write out a

print("Debug");

before the if statement to confirm the callback is being correctly called. Assuming it is, the issue could be your IfPlayerInPrivateVehicle function, could you post...
Forum: Scripting Help 09/01/2019, 07:23 PM
Replies: 3
Views: 293
Posted By Chyakka
Re: dividing numbers

% is used for modulo and / is used for division.

Using

if(4%2 == 0) //do whatever


Is completely valid in PAWN.
Forum: Scripting Help 09/01/2019, 02:14 PM
Replies: 10
Views: 333
Posted By Chyakka
Re: MySQL [ERROR]

Well if your server and database are ran on the same VPS localhost should work, otherwise you'll need to setup a SQL account and replace "IP" with the IP of the VPS running the database and changing...
Forum: Scripting Help 09/01/2019, 02:09 PM
Replies: 10
Views: 333
Posted By Chyakka
Re: MySQL [ERROR]

Are you running your database and server from the VPS?

If you're using a service like XAMPP for the SQL server and your VPS is hosting both database and server, localhost should work as the VPS...
Forum: Scripting Help 09/01/2019, 02:05 PM
Replies: 10
Views: 333
Posted By Chyakka
Re: MySQL [ERROR]

You're trying to connect to your database with the ip "IP", look for the part of your code where you define what you're connecting to and replace "IP" with localhost or whatever IP you're connecting...
Forum: Scripting Help 05/01/2019, 11:01 PM
Replies: 3
Views: 294
Posted By Chyakka
Re: MYSQL - player data loading issue

Could you show the query that calls
OnPlayerLoad(playerid)?

I'd assume it'd be in your DIALOG_LOGIN response.
Forum: Scripting Help 05/01/2019, 10:52 PM
Replies: 3
Views: 249
Posted By Chyakka
Re: Global chat problem..

You may want to include your OnPlayerText callback code, you can't fix a bug with a screenshot.
Forum: Scripting Help 05/01/2019, 10:50 PM
Replies: 1
Views: 265
Posted By Chyakka
Re: Discord Bot Chat Problem Help Please

Your best bet is to add the following code to your DCC_OnChannelMessage callback:

if(strcmp(user_name, "Your_Bot_Name", true) == 0) return 0; (make sure you add this code after the user_name...
Forum: Scripting Help 30/12/2018, 07:34 PM
Replies: 2
Views: 157
Posted By Chyakka
Re: Send a message once the server shuts down/crashes

You can use discord connector (https://forum.sa-mp.com/showthread.php?t=631562) to send a discord message from your script, just send the closing down message with the OnGameModeExit callback.
Forum: Scripting Help 30/12/2018, 07:31 PM
Replies: 11
Views: 619
Posted By Chyakka
Re: MySQL Errors

`customRank`= '''


You're using one too many apostrophes in your query, could you post the query that's performing the save?
Forum: Scripting Help 21/12/2018, 02:28 PM
Replies: 1
Views: 160
Posted By Chyakka
Re: Question about dialogs

You could utilize player variables to track what you're editing on a dialog.

https://wiki.sa-mp.com/wiki/SetPVarInt

So if you were to choose rank 1, when you select that on the dialog you'd...
Forum: Scripting Help 19/12/2018, 05:38 PM
Replies: 2
Views: 215
Posted By Chyakka
Re: IP Saving

Seems to be saving fine now, I'll be sure to mention if any more inconsistencies occur.
Showing results 1 to 25 of 61

 

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


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