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: ThePhenix
Forum: Português/Portuguese 01/03/2018, 12:27 AM
Replies: 7
Views: 426
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: 426
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: 426
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,488
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: 305
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: 305
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: 233
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: 233
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: 32
Views: 5,736
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,575
Views: 543,864
Posted By ThePhenix
Forum: Filterscripts 17/01/2018, 12:24 AM
Replies: 1,297
Sticky: Useful Snippets
Views: 536,175
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,297
Sticky: Useful Snippets
Views: 536,175
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: 567
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,458
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: 108
Views: 16,886
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: 108
Views: 16,886
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: 131
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: 715
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: 274
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: 274
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: 40
Views: 2,471
Posted By ThePhenix
Re: Favorite Classic GTA Song

Toto - Hold the line

https://www.*******.com/watch?v=htgr3pvBr-I
Forum: Discussion 03/01/2018, 06:42 PM
Replies: 782
Views: 154,950
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: 432
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...
Forum: Scripting Help 01/01/2018, 08:04 PM
Replies: 4
Views: 294
Posted By ThePhenix
Re: OnPlayerKey

This part is wrong as well, it should be GetPlayerState(playerid);
Forum: Scripting Help 01/01/2018, 07:39 PM
Replies: 17
Views: 656
Posted By ThePhenix
Re: server not connecting to mysql server

I doubt easy-mysql is causing any problem, besides that from what I see you're not enabling mysql debugging.

If you check the definition of:
stock MySQL:SQL::Connect(const host[], const user[],...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 09:00 PM.


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