Re: Today I learned - Share your newly found knowledge! -
Logic_ - 18.08.2018
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.
Re: Today I learned - Share your newly found knowledge! -
GaByM - 19.08.2018
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)
Re: Today I learned - Share your newly found knowledge! -
Mobtiesgangsa - 25.08.2018
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
Re: Today I learned - Share your newly found knowledge! -
cuber - 04.01.2019
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.
Re: Today I learned - Share your newly found knowledge! -
J0sh... - 04.01.2019
How do I delete someone else's post.
Re: Today I learned - Share your newly found knowledge! -
SkyFlare - 05.01.2019
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
Re: Today I learned - Share your newly found knowledge! -
Y_Less - 05.01.2019
Quote:
Originally Posted by SkyFlare
For fun? I guess you just dont understand it, maybe someone else will
|
No, read the first post.
Re: Today I learned - Share your newly found knowledge! -
SkyFlare - 06.01.2019
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
Re: Today I learned - Share your newly found knowledge! -
B3x7K - 18.01.2019
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
Re: Today I learned - Share your newly found knowledge! -
TheLeech - 18.01.2019
That converting from one version of MySQL to an other is really annoying.
Re: Today I learned - Share your newly found knowledge! -
SkyFlare - 03.06.2020
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.
Re: Today I learned - Share your newly found knowledge! -
playstores - 06.08.2020
You can't Referance an Array
Re: Today I learned - Share your newly found knowledge! -
coool - 07.08.2020
Quote:
Originally Posted by playstores
You can't Referance an Array
|
Arrays are always passed-by-reference.
Re: Today I learned - Share your newly found knowledge! -
DobbysGamertag - 11.08.2020
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;
}