Problem Save Car /stats /vehicles
#1

Buy cars from dealer write / stats and / vehicles car appears ! The problem is that when I give relog / server restart appear in / vehicle [ NULL ] and / stats : No spawned..Deci machine told me no car ..

Photo:

Reply
#2

Are you testing in a localhost ?
If yes then check your permissions.
Reply
#3

Yes,Using Xampp for mysql on windows how check permissions ?
REP +
Reply
#4

You have to give more details..Which version of mysql are you using?
Show your saving codes for vehicles etc.
Reply
#5

CMD:VEHICLES :
Quote:

CMD:vehicles(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti logat!");
if(PlayerInfo[playerid][pPcarkey] == 0 && PlayerInfo[playerid][pmotokey] == 0 && PlayerInfo[playerid][phelikey] == 0 && PlayerInfo[playerid][pprcarkey] == 0) return SendClientMessage(playerid,COLOR_WHITE,"{FFB870}Yo u do not have a vehicle.");
new sendername[25],name[100];
GetPlayerName(playerid,sendername,sizeof(sendernam e));
format(name,sizeof(name),"** %s's vehicles **",sendername);
SCM(playerid,COLOR_TUTORIAL2,name);
if(PlayerInfo[playerid][pPcarkey] != 0)
{
new string[356],carid = PlayerInfo[playerid][pPcarkey],locked[6],neon[10];
if(CarInfo[carid][cLock] == 1)
{
locked = "Yes";
}
else
{
locked = "No";
}
if(CarInfo[carid][cNeon] == 0)
{
neon = "None";
}
else if(CarInfo[carid][cNeon] == 1)
{
neon = "Blue";
}
else if(CarInfo[carid][cNeon] == 2)
{
neon = "Red";
}
else if(CarInfo[carid][cNeon] == 3)
{
neon = "Green";
}
else if(CarInfo[carid][cNeon] == 4)
{
neon = "White";
}
else if(CarInfo[carid][cNeon] == 5)
{
neon = "Pink";
}
else if(CarInfo[carid][cNeon] == 6)
{
neon = "Yellow";
}
format(string,sizeof(string),"Vehicle 1: Model:[%s] Locked:[%s] KM:[%.2f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s] Neon:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue]),neon);
SCM(playerid,COLOR_GRAD1,string);
}
if(PlayerInfo[playerid][pmotokey] != 0)
{
new string[256],carid = PlayerInfo[playerid][pmotokey],locked[6];
if(CarInfo[carid][cLock] == 1)
{
locked = "Yes";
}
else
{
locked = "No";
}
format(string,sizeof(string),"Vehicle 2: Model:[%s] Locked:[%s] KM:[%.2f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue]));
SCM(playerid,COLOR_GRAD2,string);
}
if(PlayerInfo[playerid][phelikey] != 0)
{
new string[256],carid = PlayerInfo[playerid][phelikey],locked[6];
if(CarInfo[carid][cLock] == 1)
{
locked = "Yes";
}
else
{
locked = "No";
}
format(string,sizeof(string),"Vehicle 3: Model:[%s] Locked:[%s] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue]));
SCM(playerid,COLOR_GRAD3,string);
}
if(PlayerInfo[playerid][pprcarkey] != 0)
{
new string[356],carid = PlayerInfo[playerid][pprcarkey],locked[6],neon[10];
if(CarInfo[carid][cLock] == 1)
{
locked = "Yes";
}
else
{
locked = "No";
}
if(CarInfo[carid][cNeon] == 0)
{
neon = "None";
}
else if(CarInfo[carid][cNeon] == 1)
{
neon = "Blue";
}
else if(CarInfo[carid][cNeon] == 2)
{
neon = "Red";
}
else if(CarInfo[carid][cNeon] == 3)
{
neon = "Green";
}
else if(CarInfo[carid][cNeon] == 4)
{
neon = "White";
}
else if(CarInfo[carid][cNeon] == 5)
{
neon = "Pink";
}
else if(CarInfo[carid][cNeon] == 6)
{
neon = "Yellow";
}
format(string,sizeof(string),"Vehicle 4: Model:[%s] Locked:[%s] KM:[%.2f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s] Neon:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue]),neon);
SCM(playerid,COLOR_GRAD4,string);
}
SCM(playerid,COLOR_TUTORIAL2,"____________________ ______");
return 1;
}

CMD:buyveh
Quote:

CMD:buyveh(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti logat!");
if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_WHITE,"{FFB870}Please get out of the car.");
if(IsPlayerInRangeOfPoint(playerid, 7.0, 941.0709,-1713.3560,13.9697))
{
if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, 0xFFB870FF, "Ai nevoie de cel putin level 3 pentru a cumpara un vehicul.");
ShowPlayerDialog(playerid,DIALOG_CARBUY, DIALOG_STYLE_LIST, "Masini:", "Masini Lente\nMasini Normale\nMasini Luxoase ( Sport )\nMotociclete / Scutere\nHelicoptere\nMasini Speciale", "Select", "Close");
}
else return SCM(playerid,COLOR_WHITE,"{FFB870}Nu esti in DealerShip");
return 1;
}

Reply
#6

HELP MEE
Reply
#7

You've got to save the car and the car spawn-er somewhere when a player logs out(E.G Server restart)..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)