MYSQL Table
#1

Hello, im completely failing at creating a table i dunno what the hell to put into it etc if someone could do it for me or display it on a ss ill be happy

her are my enums
pawn Code:
enum PInfo
{
    Pusername[25],// their username
    Ppassword[24],//password
    Pscore,// theur score (when they first join it will be 0)
    Pmoney,// same as above ^ only for money
    Pbank,//this is the money they have in the bank so same as aove ^
    Pstat,// this is if they are allowed into the class (stat) when they first join they wont have rights to use it
    Parmy,//same as above
    Pswat,//same as above
    Padmin,//their admin level is here when they first join its 0
    Pcop,// if cop level (when they taze and arrest is like 50 their cop level is 20 etc)
    Pregdate,// date they registered
    Pprison,// if they leave the server while in prison when they return they will be automaticly put in
    Phelper,// if they are in the helper clas thing (like admin)
    Pemail[255],//stores their email
    Pvip,//there vip level
    Ptime,//amount of time played on server
    Parrest,//arrest score when first join 0
    Psurender,//surender score when first join 0
    Prob,// rob score when first join 0
    Prape, //rape score when first join 0
    Pheal,// heal score when first join 0
    Phitman,// hitman score when first join 0
    Psales,//sale score when first join 0
    Pwep,//wep socre when first join 0
    Pdrug,//drug scorewhen first join 0
    Ptruck//truck score when first join 0
}
Reply
#2

That is the enum, after that you'll have to make a array of that for every player on the server, you do it like this:

Code:
new PlayerInfo[MAX_PLAYERS][PInfo] // playerinfo is the name of the first array, MAX_PLAYERS Is the name of the max players ^^, and PInfo is your just created enum.

//Then you do this to use the enum:
PlayerInfo[playerid][thing] // thing equals the thing you want to edit in the array, (chose of the things you made in your enum)
Hope I helped

or sorry i maybe read all this wrong, if you are wondering how to make the mysql tables i can tell that to,

Are you using PhpMyAdmin?
Reply
#3

Yeh the other one lol i know about arrays etc i wanted help on tables :P ive been failing bad at them and cant get it right :/ and yeh im using phpmyadmin
Reply
#4

You'll have to create new database, create a new table, and then create all the values inside it, I've found it pretty hard to descripbe in words so here is some video i found doing it, hope it'll help you and if not you can look around on the forum or ******* for some other tutorials, but what you have to do is just chose what name you want for the saving spot, how many characters you want it to MAX be and then if it's an integer, etc (strings = VARCHAR)

anyways here's the movie:
[ame]http://www.youtube.com/watch?v=nBz2lG_jm-A[/ame]

If you have any other questions I'll try to help you
(or you could always try testing it untill you get the right result, should not be that hard when you understands how to do it )
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)