SA-MP Forums Archive
filterscript not saving - 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: filterscript not saving (/showthread.php?tid=348596)



filterscript not saving - TheDiscussionCafe - 06.06.2012

hello, i downloaded someone else saving system... here: http://pastebin.com/Ag9bpP5x

i put this into my filterscripts line and the thing dont save anything. why?


Re: filterscript not saving - Edward156 - 06.06.2012

Quote:
Originally Posted by n00b_scripter
Посмотреть сообщение
well post it over here i dont wana go to jail again
Код:
"This website/URL has been blocked until further notice either pursuant to Court orders or on the Directions issued by the Department of Telecommunications"
this is why i ask everyone to do this
How will you go to jail?

And here is the script he's referring to:

pawn Код:
#include <a_samp>
#include <dini>
#include <dutils>
#include <dudb>
 
#define savefolder "/save/%s.ini"
 
#pragma unused ret_memcpy
 
public OnPlayerConnect(playerid)
{
        new pname[128];
        new file[128];
        GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), savefolder,pname);
    if(!dini_Exists(file)) {
        dini_Create(file);
        dini_IntSet(file, "Skin", 0);
        dini_IntSet(file, "Weapon", 0);
        dini_IntSet(file, "Ammo", 0);
        dini_IntSet(file, "Team", 0);
        SetPlayerSkin(playerid, dini_Int(file, "Skin"));
        GivePlayerWeapon(playerid, dini_Int(file, "Weapon"), dini_Int(file, "Ammo"));
        SetPlayerTeam(playerid, dini_Int(file, "Team"));
 
    }
    else {
        SetPlayerSkin(playerid, dini_Int(file, "Skin"));
        GivePlayerWeapon(playerid, dini_Int(file, "Weapon"), dini_Int(file, "Ammo"));
        SetPlayerTeam(playerid, dini_Int(file, "Team"));
        }
        return 1;
}
 
public OnPlayerDisconnect(playerid, reason)
{
        new pname[128];
        new file[128];
        GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), savefolder,pname);
    if(!dini_Exists(file)) {
    }
    else {
        dini_IntSet(file, "Skin", GetPlayerSkin(playerid));
        dini_IntSet(file, "Weapon", GetPlayerWeapon(playerid));
        dini_IntSet(file, "Ammo", GetPlayerAmmo(playerid));
                dini_IntSet(file, "Team", GetPlayerTeam(playerid));
       
       
    }
        return 1;
}



Re: filterscript not saving - TheDiscussionCafe - 06.06.2012

help!


Re: filterscript not saving - Firo - 06.06.2012

Where is the 'file' stock Mr.Smart?