18.11.2016, 17:43
Quote:
You are making me hyped. Cant wait to see the results, thanks mate! I've searched a bit thru Git and seems that it does support both mysql and mysqli so shouldnt be a problem for it to handle it.
Also gotta look into this https://github.com/aleksandarzivanovic/samphp He wrote that he made some stuff that allow dynamic features (dynamic objects, 3d texts etc.) Looks like we will have to use SQL as contact in between PHP and Pawn haha. Send the Request from Pawn to SQL, get the result from the SQL inside the PHP, magic hahaha |
PHP код:
Event::on("GameModeInit", function() {
$mysql = mysqli_connect("127.0.0.1", "samp", "0000", "samp");
});
Event::on("GameModeExit", function() {
mysqli_close($mysql);
});
Код:
Warning: mysqli_close() expects parameter 1 to be mysqli, null given in ...
I can't use variable outside of events or functions...
If we can use global vars it'll work...
Alt way: Make a connection each time doing something which is bad
No way of having global variables, if you know a way, tell me.