Jump to content

Question..


BumbiS*

Recommended Posts

So, i want to know how can i check if player is bla bla bla, from mySQL..

In sa-mp that is something like this

if(PlayerInfo[playerid][pFraction] == 1)

{

blablabla

}

else

{

Shows that you cant use that command, or what.

}

--------------------

And I want to know how can i make this in MTA?

Link to comment

but the problem is i dont really know what do you want..

you said something about mysql, but in your example i cant find anything that looks like fetching data from mysql.

these links could be helpful, if you need further help - try to better explain your problem and ask:

https://wiki.multitheftauto.com/

https://wiki.multitheftauto.com/wiki/Mysql

https://wiki.multitheftauto.com/wiki/Modules/MTA- ... etch_assoc

for storing data you can also use SQLite, which is almost like MySQL but doesnt require any addional install

https://wiki.multitheftauto.com/wiki/ExecuteSQLSelect (check "See also")

Link to comment

No, thats not what i want..

Ah.. You don't understand me.

I know, about control structures..

I want to know about mysql in MTA scripting...

In sa-mp pawno it will be like this, without mysql. But i want to know how can server get info from sql database.

if(PlayerData[playerid][pFaction] == 1)

{

SendClientMessage(playerid, ORANGE, "Hello, officer! Have a good day, Sir!");

return 1;

}

else

{

SendClientMessage(playerid, RED, "You are not a Police officer!");

return 1;

}

Above code in MTA... Not from .xml files account base, but from mySQL database.

Link to comment

And I still don't get your code. It has nothing to do with MySQL.

You should just learn MySQL itself, using it is in every language almost the same.

Use the links provided here, we can't help you getting the stuff into your brain, that's your part.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...