storing offline player ip into a variable
#9

Quote:
Originally Posted by Jefff
Посмотреть сообщение
I'm using this and result is:
pawn Код:
[31/10/15 22:56:17] unbanip 127.105.22.109
file content
pawn Код:
[data]
Password = 234
Cash = 0
IP = 127.105.22.109
Kills = 0
Deaths = 0
y_ini verion very old (only for testing, i'm not using YSI)
YSI version 1.04.0000
Its looks like my ban command not saving ban reason and banned player ip this is my command

PHP код:
CMD:ban(playerid,parmas[])
{
    new 
tid,res[90],ppp[50], banstring[50];
    if(
sscanf(parmas,"us",tid,res) || isnull(parmas))return SendClientMessage(playerid,-1,"/ban [id] [reason]");
    
GetPlayerIp(tid,ppp,sizeof(ppp));
    new 
INI:File INI_Open(UserPath(tid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Banned",1);
    
INI_WriteString(File,"BanAdmin",GetPlayerNameEx(playerid));
    
INI_WriteString(File,"BanReason",res);
    
INI_WriteString(File,"IP",ppp);
    
INI_Close(File);
    
format(banstringsizeof(banstring),"banip %s"ppp);
    
SendRconCommand(banstring);
    
SendRconCommand("reloadbans");
    return 
1;

And i get this:

Код:
Banned = 0
BanAdmin = 
BanReason = 
IP =
Reply


Messages In This Thread
storing offline player ip into a variable - by SalmaN97 - 23.10.2015, 18:36
Re: storing offline player ip into a variable - by J0sh... - 23.10.2015, 18:43
Re: storing offline player ip into a variable - by PrO.GameR - 23.10.2015, 22:21
Re: storing offline player ip into a variable - by SalmaN97 - 29.10.2015, 12:19
Re: storing offline player ip into a variable - by SalmaN97 - 29.10.2015, 15:24
Re: storing offline player ip into a variable - by Jefff - 29.10.2015, 17:05
Re: storing offline player ip into a variable - by SalmaN97 - 31.10.2015, 21:32
Re: storing offline player ip into a variable - by Jefff - 31.10.2015, 21:58
Re: storing offline player ip into a variable - by SalmaN97 - 01.11.2015, 20:33
Re: storing offline player ip into a variable - by Jefff - 01.11.2015, 21:01

Forum Jump:


Users browsing this thread: 1 Guest(s)