SA-MP Forums Archive
HELP | DINI HELP - 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: HELP | DINI HELP (/showthread.php?tid=79479)



HELP | DINI HELP - borisblat - 28.05.2009

why when i do this,
it creates a file named "%d" and not my name? =\

Код:
  new n[MAX_PLAYER_NAME];
	if (strcmp("/BuyCar", cmdtext, true, 10) == 0)
	{
  if(incar[playerid] == 1)
  {
   if(dini_Exists("/car/%d.txt",n))
   {
  	SendClientMessage(playerid,0xFF0000AA,".יש לך כבר מכונית אחת ברשותך");
   }
   else
   {
  	SendClientMessage(playerid,0xFF0000AA,".המערכת בבנייה");
  	dini_Create("/car/%d.txt");
   }
	 } else return SendClientMessage(playerid,0xFF0000AA,".אתה לא נמצא בתוך רכב");
		return 1;
	}
		if (strcmp("/SellCar", cmdtext, true, 10) == 0)
	{
  if(incar[playerid] == 1)
  {
   if(dini_Exists("/car/%d.txt",n))
   {
  	  dini_Remove("/car/%d.txt",n);
  	  SendClientMessage(playerid,0xFF0000AA,".מכרת בהצלחה אתה הרכב שהיה ברשותך");
   }
   else
   {
  	SendClientMessage(playerid,0xFF0000AA,".אין לך רכב");
   }
	 } else return SendClientMessage(playerid,0xFF0000AA,".אתה לא נמצא בתוך רכב");
		return 1;
	}
thx..



Re: HELP | DINI HELP - pen_theGun - 28.05.2009

HOW TO use dini's functions


Re: HELP | DINI HELP - borisblat - 28.05.2009

here is your answer: http://forum.sa-mp.com/index.php?topic=71935.0

but answer to me XD


Re: HELP | DINI HELP - pen_theGun - 28.05.2009

pawn Код:
new n[MAX_PLAYER_NAME];
new dinipath[64];
GetPlayerName(playerid, n, MAX_PLAYER_NAME);

format(dinipath, 63, "/car/%s.txt", n);

if (strcmp("/BuyCar", cmdtext, true, 7) == 0)
{
    if(incar[playerid] == 1)
    {
        if(dini_Exists( dinipath ))
        {
            SendClientMessage(playerid,0xFF0000AA,".יש לך כבר מכונית אחת ברשותך");
        }
        else
        {
            SendClientMessage(playerid,0xFF0000AA,".המערכת בבנייה");
            dini_Create( dinipath );
        }
    } else return SendClientMessage(playerid,0xFF0000AA,".אתה לא נמצא בתוך רכב");
    return 1;
}
if (strcmp("/SellCar", cmdtext, true, 8) == 0)
{
    if(incar[playerid] == 1)
    {
        if(dini_Exists( dinipath ))
        {
            dini_Remove( dinipath );
            SendClientMessage(playerid,0xFF0000AA,".מכרת בהצלחה אתה הרכב שהיה ברשותך");
        }
        else
        {
            SendClientMessage(playerid,0xFF0000AA,".אין לך רכב");
        }
    }
    else return SendClientMessage(playerid,0xFF0000AA,".אתה לא נמצא בתוך רכב");
    return 1;
}



Re: HELP | DINI HELP - borisblat - 28.05.2009

thx. =]