09.06.2014, 23:26
So I need some help with gettime saving string in mysql...
here is what I dont know how to put it...
ENUM:
And here is where I need to check it..
With best regards Scrillex..
here is what I dont know how to put it...
ENUM:
pawn Код:
enum PDATA //We name our enumerator as PDATA (which stands for PlayerDATA). You can name it however you want.
{
pBANNED,
pBANNEDfor[20], // The reason for being banned?
pBANNEDby[MAX_PLAYER_NAME], // The ADMIN who banned this player
pBANNEDtime, // the timestamp of being banned. Not necessary but useful for showing stuff.
pUNBANtime
}
pawn Код:
public OnAccountLoad(playerid)
{
pInfo[playerid][Admin] = cache_get_field_content_int(0, "Admin"); //we're getting a field 4 from row 0. And since it's an integer, we use cache_get_row_int
pInfo[playerid][VIP] = cache_get_field_content_int(0, "VIP"); //Above
pInfo[playerid][Money] = cache_get_field_content_int(0, "Money");//Above
pInfo[playerid][posX] = cache_get_field_content_float(0, "PosX");//Above. Since player's position is a float, we use cache_get_field_content_float
pInfo[playerid][posY] = cache_get_field_content_float(0, "PosY");//Above
pInfo[playerid][posZ] = cache_get_field_content_float(0, "PosZ");//Above
pInfo[playerid][pBANNEDfor] = cache_get_row(0, "pBANNEDfor");//THIS ONE!!!
pInfo[playerid][pBANNEDby] = cache_get_row(0, "pBANNEDby");//THIS ONE!!!!
pInfo[playerid][pUNBANtime] = cache_get_field_content_int(0, "pUNBANtime");
pInfo[playerid][pBANNEDtime] = cache_get_field_content_int(0, "pBANNEDtime");
pInfo[playerid][pBANNED] = cache_get_field_content_int(0, "pBANNED");
GivePlayerMoney(playerid, pInfo[playerid][Money]);
SendClientMessage(playerid, -1, "Successfully logged in"); //tell them that they have successfully logged in
return 1;
}