Faction Cars
#1

Hi. I made a custom basic faction system, via mysql

PHP код:
enum playerinfo
{
pFaction
............ 
but my question is how can I make faction cars?

shall I add them inside of MYSQL? i can create "factioncar" table, and as rows i can create

PHP код:
 carid,  carXcarYcarZ,  carcolorcarcolor2licenseplate 
is that a good ideea?

but then what?
Reply
#2

Sounds good to me; I just don't understand what else you expect us to tell you with "but then what?". Create a command (e.g: /buyfcar) that adds a vehicle to that table.
Reply
#3

And how can I make script to put into the game the car id's from mysql?

also how can I set to make "factionvehicle" to be usable only by pFaction == 1?
Reply
#4

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
And how can I make script to put into the game the car id's from mysql?

also how can I set to make "factionvehicle" to be usable only by pFaction == 1?
Make sure the carid column is of type INTEGER, is the PRIMARY KEY and is set to AUTO_INCREMENT (I know for a fact that SQLite will automatically AUTOINCREMENT INTEGERS set to be PRIMARY KEYs, but I'm not sure if MySQL does).

Take a look at OnPlayerEnterVehicle.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)