SA-MP Forums Archive
Cant can load Money - 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: Cant can load Money (/showthread.php?tid=387385)



Cant can load Money - PAWNO-ANFДNGER - 24.10.2012

Hey samp-team,

I have a big problem, I can load anything, but not that money..
I will show you that script, my Friend helped me!


PHP код:
//Enums
enum SpielerDaten
{
    
Adminlevel,
    
Level,
    
Fraktion,
    
Team,
    
Geld,
    
sLogin
};
stock SpielerSpeichern(playerid
{
    new 
Spieler[64];
    new 
Sname[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,Pname,sizeof(Sname));
    
format(Spieler,sizeof(Spieler),"/Userfiles/%s.txt",Sname);
    if(
dini_Exists(Spieler))
     {
         
SetPlayerScore(playerid,dini_Int(Spieler,"Level"));
         
dini_IntSet(Player,"AdminLevel",sSpieler[playerid][Adminlevel]);
         
dini_IntSet(Spieler,"Level",sSpieler[playerid][Level]);
         
dini_IntSet(Spieler,"Fraktion",sSpieler[playerid][Fraktion]);
         
dini_IntSet(Spieler,"Team",sSpieler[playerid][Team]);
         
dini_IntSet(Spieler,"Geld",sSpieler[playerid][Geld]);
     }
    return 
1;
}
//SpielerLaden-STOCK
stock SpielerLaden(playerid)
{
    new 
Spieler[64];
    new 
Sname[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,Sname,sizeof(Sname));
    
format(Spieler,sizeof(Spieler),"/Userfiles/%s.txt",Sname);
    if(
dini_Exists(Spieler))
     {
         
sSpieler[playerid][Adminlevel] = dini_Int(Spieler,"Adminlevel");
         
sSpieler[playerid][Level] = dini_Int(Spieler,"Level");
         
sSpieler[playerid][Fraktion] = dini_Int(Spieler,"Fraktion");
         
sSpieler[playerid][Team] = dini_Int(Spieler,"Team");
         
sSpieler[playerid][Geld] = dini_Int(Spieler,"Geld");
         
sSpieler[playerid][sLogin] = 1;
         
SpawnPlayer(playerid);
     }
    return 
1;

I will thank alot for help(rep++) )

PS Iґm german, so please not so hard!


Re: Cant can load Money - Youice - 24.10.2012

money means what in german? xD


Re: Cant can load Money - gtakillerIV - 24.10.2012

If you don't know alot of English then please post here:

http://forum.sa-mp.com/forumdisplay.php?f=28

Problem is we didin't understand much from your code.


Re: Cant can load Money - Youice - 24.10.2012

under
Код:
SpielerSpeichern
PHP код:
dini_IntSet(Spieler,"Money"GetPlayerMoney(playerid)); 
under //SpielerLaden-STOCK

PHP код:
GivePlayerMoney(playeriddini_Int(Spieler,"Money")); 
change the money variables with them (:


AW: Cant can load Money - PAWNO-ANFДNGER - 24.10.2012

Iґm Sorry for the problrems

Geld = Money

Player = Spieler


AW: Re: Cant can load Money - PAWNO-ANFДNGER - 24.10.2012

Quote:
Originally Posted by Youice
Посмотреть сообщение
under
Код:
SpielerSpeichern
PHP код:
dini_IntSet(Spieler,"Money"GetPlayerMoney(playerid)); 
under //SpielerLaden-STOCK

PHP код:
GivePlayerMoney(playeriddini_Int(Spieler,"Money")); 
change the money variables with them (:
Works, well done! -


Re: AW: Re: Cant can load Money - Youice - 24.10.2012

Quote:
Originally Posted by PAWNO-ANFДNGER
Посмотреть сообщение
Works, well done! -:)
np : D!!!