SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.02 seconds.
Search: Posts Made By: SyS
Forum: Scripting Help 22/09/2018, 07:27 AM
Replies: 6
Views: 102
Posted By SyS
Re: Command

That's exactly same as he doing now.return does breaks the control flow.


That's wrong it will lead the function to return INVALID_PLAYER_ID if the first iteration fails the if condition,and the...
Forum: Scripting Help 22/09/2018, 03:41 AM
Replies: 7
Views: 206
Posted By SyS
Re: select player random

The above method would be simple and will work but relying on random data to exit a iterative statement is a bad practice.You can remove random value from the iterator,assign it to a variable...
Forum: Scripting Help 16/09/2018, 02:21 AM
Replies: 7
Views: 206
Posted By SyS
Re: select player random

You can make use of iterators in y_iterate.

new Iterator:PlayersInEvent<MAX_PLAYERS>;

When player enters event use Iter_Add (https://github.com/pawn-lang/YSI-Includes/wiki/y_iterate#iter_add)...
Forum: Scripting Help 11/09/2018, 03:26 PM
Replies: 24
Views: 594
Posted By SyS
Re: Annoying sscanf id 0 debug

I can't reproduce what you reporting..Are you sure sscanf is the issue?
Forum: Everything and Nothing 11/09/2018, 03:23 PM
Replies: 80
Views: 3,635
Posted By SyS
Re: Welcome back, Y_Less!

Nice to have Y_Less back on Beta team
Forum: Scripting Help 07/09/2018, 02:16 PM
Replies: 3
Views: 69
Posted By SyS
Re: ReleasePlayerFromPrison

The error clearly states it.The function ReleasePlayerFromPrison is not defined in the scope of your script.
Forum: Scripting Help 07/09/2018, 02:14 PM
Replies: 4
Views: 61
Posted By SyS
Re: X-Gang System Failed to connect database..

The information provided in the question are not enough.There could be number of possible issues.
1.) You have not setup a MySQL server on your machine.
2.) Your credentials to connect the database...
Forum: Scripting Help 07/09/2018, 02:05 PM
Replies: 22
Views: 647
Posted By SyS
Re: SERVER:Unknown command. error even the command works well

You are using sizeof(pWeapons) as iteration's Upper bound which is MAX_PLAYERS and trying to access the 3rd dimension which has only 12 as upper bound.This will lead to INDEX OUT OF BOUNDS.Use...
Forum: Includes 03/09/2018, 03:14 PM
Replies: 11
Views: 1,240
Posted By SyS
Forum: Scripting Help 27/08/2018, 12:10 PM
Replies: 2
Views: 90
Posted By SyS
Re: Values from different table

You need relation between two tables in order to fetch data from both.Otherwise it will produce cartesian product between two tables as in SETS.

SELECT value_in_table1,value_in_table2
FROM...
Forum: Scripting Help 24/08/2018, 04:09 AM
Replies: 7
Views: 202
Posted By SyS
Re: optimize

http://wiki.c2.com/?PrematureOptimization
Forum: Includes 23/08/2018, 04:08 PM
Replies: 9
Views: 560
Posted By SyS
Re: player_geolocation.inc

That's not the case here ,those are macros which will be replaced by corresponding array it specifies, on compile time.
#define GetPlayerCountry(%0) player_geoInfo[%0][player_country]
There...
Forum: Scripting Help 23/08/2018, 12:52 PM
Replies: 2
Views: 96
Posted By SyS
Re: Date of birth in dialog (sscanf)

sscanf returns 0 if the scanning was success so use

if(!sscanf(inputtext, "p</>ddd", giorno, mese, anno))
Forum: Scripting Help 23/08/2018, 06:02 AM
Replies: 3
Views: 89
Posted By SyS
Re: warning 213: tag mismatch

use Logical AND (&&)

if(PlayerInfo[playerid][power] != 1337 && PlayerInfo[iPlayer][power] > PlayerInfo[playerid][power]) return KickAdmin(playerid);
Forum: Includes 22/08/2018, 03:54 PM
Replies: 9
[Include] matheval.inc
Views: 914
Posted By SyS
Re: matheval.inc

Yeah you are absolutely correct.I never did think of that.I will modify the test.


Edit: Ehh my method was actually scanning and pushing elements in OperandArray, into evalStack and if an...
Forum: Includes 22/08/2018, 02:53 PM
Replies: 9
[Include] matheval.inc
Views: 914
Posted By SyS
matheval.inc

matheval

https://travis-ci.com/Sreyas-Sreelal/matheval.svg?branch=master (https://travis-ci.com/Sreyas-Sreelal/matheval) https://img.shields.io/github/issues/Sreyas-Sreelal/matheval.svg...
Forum: Includes 20/08/2018, 05:31 AM
Replies: 24
Views: 1,556
Posted By SyS
Forum: Everything and Nothing 29/07/2018, 03:37 PM
Replies: 4
Views: 413
Posted By SyS
Re: Learning Mysql

https://www.w3schools.com/sql/default.asp
Forum: Scripting Help 28/07/2018, 02:48 PM
Replies: 3
Views: 159
Posted By SyS
Re: kick command

GetPlayerName(userid, Playername, sizeof(Playername)); should be called after sscanf statement otherwise userid is 0
Forum: Scripting Help 25/07/2018, 02:03 PM
Replies: 7
Views: 266
Posted By SyS
Re: Player positions not saved properly

Check for the data type of field (playerX,playerY,playerZ) in your CREATE TABLE query or you can check the same from phpmyadmin
Forum: Scripting Help 25/07/2018, 01:55 PM
Replies: 7
Views: 266
Posted By SyS
Re: Player positions not saved properly

Check your field' data type
Forum: Scripting Help 25/07/2018, 08:17 AM
Replies: 9
Views: 233
Posted By SyS
Re: Vehicle without engine issue

481 || 509 || 510 is 1.If you want to check it using || (logical OR) you should go for something like this:

if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509...
Forum: Scripting Help 22/07/2018, 07:41 AM
Replies: 4
Views: 205
Posted By SyS
Re: [HELP] How to check server empty?

If you are using y_iterate you can use Iter_Count(Player) to get number of online players and check if it is zero
Forum: Filterscripts 21/07/2018, 02:26 PM
Replies: 62
[FilterScript] Anti-Aimbot by ipsLeon
Views: 27,926
Posted By SyS
Re: Anti-Aimbot by ipsLeon

~ is bitwise NOT. if bit is 0 result is 1 and vice versa
Forum: Discussion 19/07/2018, 06:11 AM
Replies: 782
Views: 154,066
Posted By SyS
Re: Today I learned - Share your newly found knowledge!

It is syntactically correct but it won't wont give the result what you expect to get. || is logical OR operator it returns true (1) if one of the operands is true (not 0) and returns false (0) if...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 08:46 AM.


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