23.09.2011, 16:03
hey guys after my previous topic i used this Script piece:
but when i type the command ingame nothing happens any ideas why?
Apart from that thanks![Smiley](images/smilies/smile.png)
Regards,
Zon.
I Would Also Like to note: it compiles with no errors and the other cmds work fine just not this cmd
Код:
CMD:rban ( playerid, params[ ] ) { if ( P_DATA[ playerid ][ Level ] >=4 ) { new Player; new ip[128]; new ip1[128]; if ( sscanf ( params, "u", Player ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/rban [PlayerID]" ); if ( IsPlayerConnected( Player ) ) { new year,month,day; getdate(year, month, day); new hour,minuite,second; gettime(hour,minuite,second); new File:Bans=fopen("BanLog.txt", io_append); FormatMSG( playerid, ABLUE, "|- You Have Banned %s [Date: %d/%d/%d] [Time: %d,%d] -|", PlayerName2 ( Player ), day, month, year, hour, minuite); FormatMSG( Player, ABLUE, "|- You Have Been Banned By %s [Date: %d/%d/%d] [Time: %d,%d] -|", PlayerName2 ( playerid ), day, month, year, hour, minuite); new str[128]; format(str,sizeof(str),"%s has been Range Banned by Administrator %s | [Date: %d/%d/%d] [Time: %d,%d]",PlayerName2 ( Player ) ,PlayerName2 ( playerid ), day, month, year, hour, minuite); fwrite(Bans, str); print(str); GetPlayerIp(Player, ip1, sizeof(ip1)); format(ip,128,"%s**",ip); fwrite(Bans, ip); format(ip1,128,"banip %s",ip1); SendRconCommand(ip1); fclose(Bans); } else return SendClientMessage( playerid, RED, "ERROR: Player Is Not Online!" ); } else return SendaLevel ( playerid, 4 ); return 1; }
Apart from that thanks
![Smiley](images/smilies/smile.png)
Regards,
Zon.
I Would Also Like to note: it compiles with no errors and the other cmds work fine just not this cmd