SA-MP Forums Archive
Need help with a Check ... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help with a Check ... (/showthread.php?tid=96300)



Need help with a Check ... - Littl3j0hNy - 07.09.2009

Hi Community,
I'm currently working on a Property Script and I have found a
Bug/Mistake or something that I can't fix :/

So I need help with this.
This doesn't work:

pawn Код:
if(dini_Isset(PropertyFile(p), "OldOwner") && strcmp(Playername(playerid),dini_Get(PropertyFile(p),"OldOwner"),true) == 0)
The complete Function:

pawn Код:
stock CheckOldPropertyOwner(playerid)
{
    new string[256];
  for (new p = 0; p < mProps; p++)
    {
        if(dini_Isset(PropertyFile(p), "OldOwner") && strcmp(Playername(playerid),dini_Get(PropertyFile(p),"OldOwner"),true) == 0)
        {
            GivePlayerMoney(playerid, dini_Int(PropertyFile(p), "OldOwnerMoney"));
            format(string, sizeof(string), "== %s wurde dir abgekauft ! Du erhдlst dafьr %d$", dini_Get(PropertyFile(p), "Name"),dini_Int(PropertyFile(p), "OldOwnerMoney"));
            SendClientText(playerid, string);
            dini_Unset(PropertyFile(p), "OldOwner");
            dini_Unset(PropertyFile(p), "OldOwnerMoney");
        }
    }
    return 1;
}
What is there wrong ?

- LJ