Please help
#1

This is my creating system for players that disconnect
Код:
	if(PLAYERLIST_authed[playerid] == 1)
	{
		dUserSetINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
		dUserSetINT(PlayerName(playerid)).("Cash",GetPlayerMoney(playerid));
		dUserSetINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
	 	dUserSetINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
		dUserSetINT(PlayerName(playerid)).("Army",CanUseArmy[playerid]);
		dUserSetINT(PlayerName(playerid)).("SWAT",CanUseSWAT[playerid]);
		dUserSetINT(PlayerName(playerid)).("RegularPlayer",IsRegularPlayer[playerid]);
		dUserSetINT(PlayerName(playerid)).("DrugHouseOwner",DrugHouseOwner[playerid]);
		dUserSetINT(PlayerName(playerid)).("OttoOwner",OttoOwner[playerid]);
		dUserSetINT(PlayerName(playerid)).("TSkill",TerroristSkill[playerid]);
		dUserSetINT(PlayerName(playerid)).("RobSkill",RobSkill[playerid]);
		dUserSetINT(PlayerName(playerid)).("HasPackC4",HasPackC4[playerid]);
		dUserSetINT(PlayerName(playerid)).("HasPackRope",HasPackRope[playerid]);
		dUserSetINT(PlayerName(playerid)).("HasPackMoney",HasPackMoney[playerid]);
		dUserSetINT(PlayerName(playerid)).("SavedWantedLevel",SavedWantedLevel[playerid]);
		dUserSetINT(PlayerName(playerid)).("SavedJailTime",SavedJailTime[playerid]);
		return 1;
	}
How i can make on OnplayerConnect he loads it from the player?
Reply
#2

here u go

All Under OnPlayerConnect
pawn Код:
dini_IntSet("Bankcash",BankCash[playerid]);
dini_IntSet("Cash",SetPlayerMoney(playerid));
dini_IntSet("Score",SetPlayerScore(playerid));
dini_IntSet("Adminlevel",AdminLevel[playerid]);
dini_IntSet("Army",CanUseArmy[playerid]);
dini_IntSet("SWAT",CanUseSWAT[playerid]);
dini_IntSet("RegularPlayer",IsRegularPlayer[playerid]);
dini_IntSet("DrugHouseOwner",DrugHouseOwner[playerid]);
dini_IntSet("OttoOwner",OttoOwner[playerid]);
dini_IntSet("TSkill",TerroristSkill[playerid]);
dini_IntSet("RobSkill",RobSkill[playerid]);
dini_IntSet("HasPackC4",HasPackC4[playerid]);
dini_IntSet("HasPackRope",HasPackRope[playerid]);
dini_IntSet("HasPackMoney",HasPackMoney[playerid]);
dini_IntSet("SavedWantedLevel",SavedWantedLevel[playerid]);
dini_IntSet("SavedJailTime",SavedJailTime[playerid]);
Reply
#3

I believe it's obvious that he doesn't use Dini.
Reply
#4

It is dini and the gm he is using is SFCR-RPG by Stevo127
Reply
#5

Dudb is not Dini.

Check if the file exists and load the data on connect
pawn Код:
// If he is registered
SetPlayerScore( playerid, dUserINT( PlayerName( playerid ) ).( "Score" ) ); // An example
Reply
#6

errors



C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(225 : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2259) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2259) : error 035: argument type mismatch (argument 2)
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2260) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2260) : error 035: argument type mismatch (argument 2)
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2261) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2262) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2263) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2264) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2265) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2266) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2267) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(226 : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2269) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2270) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2271) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2272) : warning 202: number of arguments does not match definition
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\SFCRRPG.pwn(2273) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.



?
Reply
#7

Use if(fexist(file)) OR if (!dini_Exists(file))
Reply
#8

fixed but...
dUserSetINT(PlayerName(i)).("Cash",GetPlayerMoney( i));
How i can change this to he loads it but not create its?
Reply
#9

pawn Код:
// Gets the cash from the file's data
dUserINT( PlayerName( i) ).( "Cash" );
pawn Код:
// Sets the cash to the file's data
dUserSetINT( PlayerName( i ) ).( "Cash", GetPlayerMoney( i ) );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)