How to write in to another players INI file
#6

Quote:
Originally Posted by Chenko
Посмотреть сообщение
This is how it should be, I've explained everything with comments.

PHP код:
CMD:sethit(playeridparams[])
{
     new 
receiveramount;
     if (!
sscanf(params"ui"receiveramount//You want to use "u" instead of "i" because that is the sscanf specifier for playerid
     
{
         if(!
IsPlayerConnected(receiver)) //Making sure the player is connected. 
                    
return SendClientMessage(playerid, -1"That player isn't connected!"); 
          new 
INI:File INI_Open(UserPath(receiver)); //Getting the userpath of the playerid that sscanf got
          
INI_SetTag(File"data"); //Setting the tag so it goes underneath data and not above. 
          
INI_WriteInt(File,"Hit",amount);
          
INI_Close(File);
     }

Hey, thanks the comments were helpful but now when I use the /sethit command the players Hit is not changed in their file. I use the command, then check the players file but Hit = 0 instead of the value I put in the command.
Reply


Messages In This Thread
How to write in to another players INI file - by Spikmun - 11.05.2013, 22:33
Re: How to write in to another players INI file - by Frede - 11.05.2013, 22:40
Re: How to write in to another players INI file - by Spikmun - 11.05.2013, 23:23
Re: How to write in to another players INI file - by JJB562 - 12.05.2013, 00:06
Re: How to write in to another players INI file - by Chenko - 12.05.2013, 01:06
Re: How to write in to another players INI file - by Spikmun - 12.05.2013, 01:48

Forum Jump:


Users browsing this thread: 1 Guest(s)