12.07.2011, 16:29
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
when i go to compail there are no problems
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(string, sizeof(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(string2, sizeof(string2), "drugs/%s.ini", PlayerName(playerid));
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(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;
}