Today I learned - Share your newly found knowledge!

Quote:
Originally Posted by GRiMMREAPER
Посмотреть сообщение
Well, I really should've added an explanation as to why it happened.
I'd suggest using easyDialog or y_inline.
Reply

Quote:
Originally Posted by Freaksken
Посмотреть сообщение
Method 1:
Method 2:
Method 3:
Код:
//define once
#define UNIQUE_ID 1


// Use this in any other file
enum FileName_ENUM {
	FileName_Login = UNIQUE_ID,
	FileName_Register
};
#undef UNIQUE_ID
#define UNIQUE_ID (_:FileName_ENUM)
Reply

Today i learned SQLite checking with a timer

basicly what i did is

Код:
#include    [UNHANDLED-TAG=a_samp] #include    [UNHANDLED-TAG=zcmd] #include    [UNHANDLED-TAG=sscanf2][/UNHANDLED-TAG=sscanf2][/UNHANDLED-TAG=zcmd][/UNHANDLED-TAG=a_samp]

//Created a db specifier and a timer new DB:handle; new handletimer = 0;

main() {

}

///******************  *		Forwards  *//********************/ forward SQLiteReboot(DB:db); // forwarded a callback for the specified function

public OnGameModeInit() { 	if((handle = db_open(“server.db3”)) == DB:0) 	{            //made the temporary timer to call from a callback for each 3 seconds            // if its not connecting to restart or exit the gamemode 	    handletimer = SetTimerEx(“SQLiteReboot”, 3000, true, “d”, _:handle); 	} 	else 	{ 	    KillTimer(handletimer); 	} 	return 1; }

public OnGameModeExit() { 	if(handle) db_close(handle); 	return 1; }

public SQLiteReboot(DB:db) {         // restart or exit the gamemode and print the database warning 	GameModeExit(); 	printf(“[server]: cannot find handle %d”, _:handle); 	return _:handle; }
try by testing it by movind the scriptfiles in e seprete dir end CTRL-Z to return scriptfiles to the previous directory and if the server console detects the dir/scriptfiles it will run the database without no problem
Reply

Quote:
Originally Posted by SkyFlare
Посмотреть сообщение
Today I learned my partner does not like me talking in code to her.
I also learned I can get smart without her realizing it.

I told her if I don't stop talking in code to her that nothing will happen XD


Why would you do that? That's so retarded omfg.

Reply

How do I delete someone else's post.
Reply

Quote:
Originally Posted by cuber
Посмотреть сообщение
Why would you do that? That's so retarded omfg.
For fun? I guess you just dont understand it, maybe someone else will
Reply

Quote:
Originally Posted by SkyFlare
Посмотреть сообщение
For fun? I guess you just dont understand it, maybe someone else will
No, read the first post.
Reply

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
No, read the first post.
damn, I did exactly what not to do I see, ill remove it lol woops
Reply

Today i learned how to make include like Emmet_
but that code is messed up

You can look in here:
https://github.com/B3x7k/OnPlayerRestoreHack
Reply

That converting from one version of MySQL to an other is really annoying.
Reply

Today I learned I can use my Spotify Music in GTA SA, by creating a shortcut of the Spotify Offline Library and pasting it into the User Tracks Area in documents, so it'll update if I add more music to be downloaded in spotify, all I have to do is set Automatic Scan to On.
Reply

You can't Referance an Array
Reply

Quote:
Originally Posted by playstores
View Post
You can't Referance an Array
Arrays are always passed-by-reference.
Reply

TIL that you can use %<int> to tabulate (/t). Currently seeing what else you can use it on. Seems it adds spaces per int (%06s will add 6, %12s will add 12 etc).


pawn Code:
if(strcmp(cmd, "/test", true) == 0) {

        new string[24], someVar[6] = "SA:MP";
        format(string, sizeof(string), "%06s %s", "", someVar);
        ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Tu Madre", string, ":)", ":(");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)