SA-MP Forums Archive
Money Problem - 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: Money Problem (/showthread.php?tid=331083)



Money Problem - Yordan_Kronos - 03.04.2012

Hello everyone.I have one problem with money,when I go out and then go back to the server my money is doubled.

Example : i have $ 5000. When i disconnect and join again my money i have $ 10 000.

I Use Roleplay Script - Get Started [sscanf, zcmd, dini, foreach] by Jafet_Macario.If you can help me .. please write here.Thanks


Re: Money Problem - blank. - 03.04.2012

More information would be helpful.


Re: Money Problem - BleverCastard - 03.04.2012

Show us your OnPlayerConnect callback.


Re: Money Problem - Yordan_Kronos - 03.04.2012

Код:
	    SCM(playerid,COLOR_RED,"Вашето име е невалидно,моля влезте с Roleplay име Пример: Ivan_Ivanov");
	}
	new string[128];
	new plname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, plname, sizeof(plname));
	PlayerInfo[playerid][pLevel] = 0;
	PlayerInfo[playerid][pCash] = 0;
	PlayerInfo[playerid][pDriveLic] = 0;
	PlayerInfo[playerid][pVip] = 0;
	PlayerInfo[playerid][pAdmin] = 0;
	PlayerInfo[playerid][pTester] = 0;
	PlayerInfo[playerid][pPos_x] = 0.0;
	PlayerInfo[playerid][pPos_y] = 0.0;
	PlayerInfo[playerid][pPos_z] = 0.0;
	PlayerInfo[playerid][pSpawn] = 0;
	PlayerInfo[playerid][pSex] = 0;
	RefuelTime[playerid] = 0;
	TrackCar[playerid] = 0;
	PlayerInfo[playerid][pAge] = 0;
	PlayerInfo[playerid][pOrigin] = 0;
	PlayerInfo[playerid][pModel] = 23;
	PlayerInfo[playerid][pLocked] = 0;
	PlayerInfo[playerid][pExp] = 0;
	PlayerInfo[playerid][pWarns] = 0;
	PlayerNeedsHelp[playerid] = 0;
	Mobile[playerid] = 255;
	PlayerInfo[playerid][pMuted] = 0;
	PlayerInfo[playerid][pMuteTime] = 0;
	gPlayerTutorialing[playerid] = 0;
	format(string, sizeof(string), "/Users/%s.ini", plname);
	new DialogString[1024];
Код:
	TextDrawSetProportional(Textdraw98[playerid], 1);
	TextDrawAlignment(Textdraw98[playerid],2);
	GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
	SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
	SetOriginalColor(playerid);
	return 1;



Re: Money Problem - sjvt - 03.04.2012

I did download the script, and did look into it and there is nothing wrong.


Re: Money Problem - Yordan_Kronos - 03.04.2012

Please someone to help me fast ;(


Re: Money Problem - Yordan_Kronos - 03.04.2012

If some help me i will pay


Re: Money Problem - Bogdan1992 - 03.04.2012

because you have GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
You need to have SetPlayerMoney(playerid, PlayerInfo[playerid][pCash]);


Re: Money Problem - Yordan_Kronos - 04.04.2012

Bogdan Thanks very much, i will give you +rep