Register - Question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Register - Question (
/showthread.php?tid=354230)
Register - Question -
Dan_Barocu - 26.06.2012
hi i got a question why in play account in scriptfiles i have this at registered..it should appear that last date i logged in account..but i dont understand..
PHP код:
RegistredDate=53
Re: Register - Question -
Kindred - 26.06.2012
How do you expect us to help you without any code? You expect us to hack into your computer and see it for ourselves?
Common sense goes a long way.
Re: Register - Question -
SuperViper - 26.06.2012
You may be saving a string as an integer or vice-versa.
Re: Register - Question -
rk92505 - 26.06.2012
thumbs up
Re: Register - Question -
Dan_Barocu - 26.06.2012
HERE:
PHP код:
//onplayerconnect
PlayerInfo[playerid][pPainPerk] = 0;
PlayerInfo[playerid][pTraderPerk] = 0;
PlayerInfo[playerid][pTut] = 0;
strmid(PlayerInfo[playerid][pRegistredDate], "Never", 0, strlen ("None"), 255);
PlayerInfo[playerid][pMissionNr] = 0;
PlayerInfo[playerid][pWarns] = 0;
PlayerInfo[playerid][pFuel] = 1;
//
NEXT:
PHP код:
// if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
strmid(PlayerInfo[playerid][pRegistredDate],dini_Get(string2,"RegistredDate"),0,strlen(dini_Get(string2,"RegistredDate")),255);
if( strcmp( key , "Mission" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMissionNr] = strval( val ); }
//
LOGIN:
PHP код:
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pSHealth] = 0.0;
PlayerInfo[playerid][pHealth] = 50.0;
PlayerInfo[playerid][pPos_x] = 2246.6;
PlayerInfo[playerid][pPos_y] = -1161.9;
PlayerInfo[playerid][pPos_z] = 1029.7;
PlayerInfo[playerid][pInt] = 15;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pModel] = 48;
new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
PlayerInfo[playerid][pPnumber] = randphone;
PlayerInfo[playerid][pPhousekey] = 255;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pAccount] = 50000;
PlayerInfo[playerid][pReg] = 1;
GivePlayerCash(playerid, 5000);
new d,m,y;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "%d/%d/%d at %d:%d:%d",d,m,y,h,mi,s);
strmid(PlayerInfo[playerid][pRegistredDate], string, 0, strlen(string), 255);
Re: Register - Question -
Dan_Barocu - 26.06.2012
BUMP sorry i forgot i posted..