save licenses stats?
#1

ok ive made a filterscript where ppl buy licenses and can /mylic to see them and /slic to officers but they only save till server restarts, so if they /mylic it shows again "not passed!"

so i need to know how ppl can save these?

im using ladmin4v2 as my register and login


Код:
new HasDrivingLic[MAX_PLAYERS];
new HasGunLic[MAX_PLAYERS];
new HasFlyingLic[MAX_PLAYERS];
Код:
CMD:buydrivinglic(playerid, params[])
{
 if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2046.6372,-1908.0178,13.5469)) return SendClientMessage(playerid,-1,"You must be near the DMV to obtain a driving license.");
 if(HasDrivingLic[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You already have a driving license.");
 if(HasDrivingLic[playerid] == 0)
 (HasDrivingLic[playerid] = 1);
 GivePlayerMoney(playerid, -2000);
 SendClientMessage(playerid, -1, "You've bought a driving license for $2000, drive safely, otherwise the police department may suspend it from you.");
 return 1;
}

CMD:buygunlic(playerid, params[])
{
 if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2046.6372,-1908.0178,13.5469)) return SendClientMessage(playerid,-1,"You must be near the DMV to obtain a gun license.");
 if(HasGunLic[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You already have a gun license.");
 if(HasGunLic[playerid] == 0)
 (HasGunLic[playerid] = 1);
 GivePlayerMoney(playerid, -25000);
 SendClientMessage(playerid, -1, "You've bought a gun license for $25,000, don't do anything illegal with it or the police department can suspend you.");
 return 1;
}

CMD:buyflyinglic(playerid, params[])
{
	if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2046.6372,-1908.0178,13.5469)) return SendClientMessage(playerid,-1,"You must be near the DMV to obtain a flying license.");
	if(HasFlyingLic[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You already have a pilot license.");
 	if(HasFlyingLic[playerid] == 0)
 	(HasFlyingLic[playerid] = 1);
 	GivePlayerMoney(playerid, -2000);
 	SendClientMessage(playerid, -1, "You've bought a pilot license for $2000, you are now able to fly with any helicopter/plane.");
 	return 1;
}


CMD:mylic(playerid, params[])
{
	new lic[128], drivinglic[12], gunlic[12],flyinglic[12];
	if(HasDrivingLic[playerid] == 0) drivinglic = "Not Passed";
	else drivinglic = "Passed";
	if(HasGunLic[playerid] == 0) gunlic = "Not Passed";
	else gunlic = "Passed";
	if(HasFlyingLic[playerid] == 0)  flyinglic = "Not Passed";
	else flyinglic = "Passed";
 	format(lic, sizeof(lic), "** Your Licenses - [Driving]: %s || [Gun]: %s || [Flying]: %s", drivinglic,gunlic,flyinglic);
 	SendClientMessage(playerid, -1, lic);
 	return 1;
}
Reply
#2

bum i need help ffs why nobody help me on this one thing...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)