SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.01 seconds.
Search: Posts Made By: ThePhenix
Forum: Includes 04/03/2018, 06:21 AM
Replies: 23
[Include] FL_ Filter Laggers
Views: 2,476
Posted By ThePhenix
Re: FL_ Filter Laggers

Just a suggestion, I was checking your code and you have the following:

stock IsPlayerLagging(playerid)
return (FLaggers_Player[playerid][FLwarns] > 1) ? true : false;

If you look closely, you...
Forum: Português/Portuguese 01/03/2018, 12:27 AM
Replies: 7
Views: 368
Posted By ThePhenix
Re: @RESOLVIDO @resolved

This is what I mean:

new buf[1024], source[128];
new BRW:handle = BRW::Open("Binary/testfoo.amx", bin_read);
new len = BRW::GetTotalBytes(handle);
new p = len % 4;
len -= p;
...
Forum: Português/Portuguese 01/03/2018, 12:10 AM
Replies: 7
Views: 368
Posted By ThePhenix
Re: obter .AMX em hexadecimal

If you were reading and writing to the file byte by byte then this wouldn't be a problem. However, what you can do is write the number of bytes from the .amx file that are divisible by 4 and treat...
Forum: Português/Portuguese 01/03/2018, 12:03 AM
Replies: 7
Views: 368
Posted By ThePhenix
Re: obter .AMX em hexadecimal

Note that this won't work if the size of the .amx file is not divisible by 4. Sorry for speaking english in this section.
Forum: Includes 25/02/2018, 07:09 AM
Replies: 21
[Include] Maze Generator
Views: 3,190
Posted By ThePhenix
Re: Maze Generator

I updated the code with an improved version. The code I originally published wasted a lot of memory and took a long time to compile. I optimized the code by storing all the required information into...
Forum: Scripting Help 29/01/2018, 04:48 AM
Replies: 6
Views: 269
Posted By ThePhenix
Re: A little issue

Can you show your ban table's structure?
Forum: Scripting Help 29/01/2018, 04:36 AM
Replies: 6
Views: 269
Posted By ThePhenix
Re: A little issue

I don't see anything wrong in your code specifically. Have you tried enabling mysql debugging?
Forum: Scripting Help 26/01/2018, 05:31 PM
Replies: 7
Views: 189
Posted By ThePhenix
Re: Help STRCMP

DobbysGamertag pointed out something very important. It's really irresponsible from your part not to use any hashing method to store passwords. I recommend you to use bcrypt.
Forum: Scripting Help 26/01/2018, 05:23 PM
Replies: 7
Views: 189
Posted By ThePhenix
Re: Help STRCMP

You first need to check if the inputtext is a null string before comparing both strings. You could use this useful macro by Y_Less:

#if !defined isnull
#define isnull(%1) ((!(%1[0])) ||...
Forum: Includes 26/01/2018, 04:13 PM
Replies: 25
Views: 4,362
Posted By ThePhenix
Re: actor_plus » Useful functions/callbacks for actors

I like the fact that you're using bit flags.
Forum: Scripting Help 19/01/2018, 05:41 PM
Replies: 4,565
Views: 519,222
Posted By ThePhenix
Forum: Includes 17/01/2018, 12:56 AM
Replies: 77
Views: 9,230
Posted By ThePhenix
Re: (rAct) Anti Car Troll.

Just a suggestion, as a rule of thumb as the code optimizations topic states: if you're going to use the value returned by a function more than once it is better to create a variable to hold that...
Forum: Filterscripts 17/01/2018, 12:24 AM
Replies: 1,292
Sticky: Useful Snippets
Views: 522,002
Posted By ThePhenix
Re: Useful Snippets

Well, it would be really pointless to use an array for this case (loop through all the unoccupied vehicles), as the variable is_occupied only serves the purpose of telling you whether the vehicle...
Forum: Filterscripts 17/01/2018, 12:02 AM
Replies: 1,292
Sticky: Useful Snippets
Views: 522,002
Posted By ThePhenix
Re: Useful Snippets

The function you just posted could be tweaked a little bit as it is meaningless to loop through vehicles that have not been created yet.

Hence, you should use:
...
Forum: Scripting Help 15/01/2018, 10:23 PM
Replies: 13
Views: 528
Posted By ThePhenix
Re: Help me learn PAWN

I do agree with everyone here. You should try to script some things by yourself.

Don't get unmotivated if something doesn't work. Even though you mentioned something about throwing a book to a...
Forum: Includes 11/01/2018, 07:05 PM
Replies: 21
Views: 2,206
Posted By ThePhenix
Re: Rick & Morty Portal Gun script

Just a suggestion: fix the indentation in your code. It seems that you're mixing tabs and spaces which you shouldn't. Other than that, it's a nice idea.
Forum: Includes 11/01/2018, 05:45 PM
Replies: 101
Views: 15,295
Posted By ThePhenix
Re: Easy MySQL - Simplifying the usage of MySQL queries!

Are you sure you're using the latest version? I mean the errors don't really make sense at all.

Code: https://github.com/ThreeKingz/easy-mysql/blob/master/easy-mysql.inc

I don't get any errors...
Forum: Includes 11/01/2018, 01:55 AM
Replies: 101
Views: 15,295
Posted By ThePhenix
Re: Easy MySQL - Simplifying the usage of MySQL queries!

Try downloading the latest version.
Forum: Scripting Help 07/01/2018, 11:30 PM
Replies: 4
Views: 96
Posted By ThePhenix
Re: Unkown Gamemode

It would be good if you could enable debugging level 3.
Forum: Includes 07/01/2018, 05:34 PM
Replies: 0
Views: 647
Posted By ThePhenix
BRW - Binary reader and writer for PAWN

BRW (Binary Reader and Writer)


Overall, the I/O file functions that the file.inc provides seem to be really powerful and I haven't seen an include that supports reading binary files utilizing...
Forum: Scripting Help 06/01/2018, 10:40 PM
Replies: 7
Views: 243
Posted By ThePhenix
Re: Dude

I mean, it all depends on how you want to organize your gamemode. Some people might tell you that it is not recommended to use the stock keyword but as I said it depends. The only thing the "stock"...
Forum: Scripting Help 06/01/2018, 04:43 PM
Replies: 7
Views: 243
Posted By ThePhenix
Re: Dude

Public functions allow you to define new entry points that the host application (the sa-mp server) can communicate with your script. The host application keeps track of all the public functions you...
Forum: Everything and Nothing 04/01/2018, 09:13 PM
Replies: 41
Views: 2,244
Posted By ThePhenix
Re: Favorite Classic GTA Song

Toto - Hold the line

https://www.youtube.com/watch?v=htgr3pvBr-I
Forum: Discussion 03/01/2018, 06:42 PM
Replies: 770
Views: 147,167
Posted By ThePhenix
Re: Today I learned - Share your newly found knowledge!

If you're going to check for ranges you should use "if, elseif, else" instead.
Forum: Scripting Help 02/01/2018, 02:25 PM
Replies: 3
Views: 394
Posted By ThePhenix
Re: Foreach multi dimension arrays

If you want a two dimensional array, you can do:

new Iterator:Something<1st_dim_upperbound, 2nd_dim_upperbound>;

Example:

new Iterator:Something<30, 10>;


In your case, this would be...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 10:17 AM.


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