Please help!
#1

i have drug system (it's not my) because i am a beginer i don't understund dini (i don't know how to save the drugs)
can any body help me!

script
http://www.mediafire.com/?gsa1cvtw1657s76

if you can give me the script when you make that drug will save

the line that have should seve the drugs
PHP код:
public SaveDrugs(playerid)
{
    if(
IsPlayerConnected(playerid) == 1)
    {
        new 
string[64];
        
format(stringsizeof(string), "drugs/%s.ini"PlayerName(playerid));
        if(
dini_Exists(string))
        {
            
dini_IntSet(string"Weed"PlayerInfo[playerid][sWeed]);
            
dini_IntSet(string"Cocaine"PlayerInfo[playerid][sCocaine]);
            
dini_IntSet(string"Crack"PlayerInfo[playerid][sCrack]);
            
dini_IntSet(string"Heroin"PlayerInfo[playerid][sHeroin]);
            
dini_IntSet(string"Ecstacy"PlayerInfo[playerid][sEcstacy]);
            
dini_IntSet(string"Steriods"PlayerInfo[playerid][sSteriods]);
        }
    }
    return 
1;
}
//==============================================================================
public LoadDrugs(playerid)
{
    new 
string2[64];
    
format(string2sizeof(string2), "drugs/%s.ini"PlayerName(playerid));
    new 
playername2[MAX_PLAYER_NAME];
    
GetPlayerName(playeridplayername2sizeof(playername2));
    {
        
PlayerInfo[playerid][sWeed] = dini_Int(string2,"Weed");
        
PlayerInfo[playerid][sCocaine] = dini_Int(string2,"Cocaine");
        
PlayerInfo[playerid][sCrack] = dini_Int(string2,"Crack");
        
PlayerInfo[playerid][sHeroin] = dini_Int(string2,"Heroin");
        
PlayerInfo[playerid][sEcstacy] = dini_Int(string2,"Ecstacy");
        
PlayerInfo[playerid][sSteriods] = dini_Int(string2,"Steriods");
    }
    return 
1;

when i go to compail there are no problems
Reply
#2

Do you have a folder called "drugs" in your scriptfiles?
Reply
#3

Yes of course
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)