23.03.2013, 12:37
I have problems with SCMs.. When I kick/ban myself, or the player that was kicked, I/he doesn't receive any msg. He should se the SCMToAll because I putted it, but it only says "Server closed connection.", here is pic. http://www.zaslike.com/viewer.php?fi...99gyqyxyq2.png
Here are commands.
But there is another problem.. This SCMToAll is sent, but only reason, (rzl)... Here is the pic. http://www.zaslike.com/viewer.php?fi...dvaiztqtwo.png
Here are commands.
Код:
CMD:ban(playerid, params[]) { new id, razlog[32], str[128]; if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, Crvena, "Niste ovlasceni."); if(sscanf(params,"us[32]",id,razlog)) return SendClientMessage(playerid, -1, "{FF8040}CMD: {80FFFF}/ban [Id igraca/deo imena] [razlog]"); format(str, sizeof(str), "SERVER: Admin %s je banao %s, razlog: %s.", GetName(playerid), GetName(id), razlog); SendClientMessageToAll(Crvena, razlog); new banfile[64]; format(banfile,64,BanFolder,GetName(id)); new File:ban = fopen(banfile, io_write); fwrite(ban, " - BAN - \n"); new var[128]; format(var,64,"Admin = %s\n", GetName(playerid)); fwrite(ban,var); format(var,128,"Razlog = %s\n", razlog); fwrite(ban,var); fclose(ban); Kick(id); return 1; } CMD:kick(playerid, params[]) { new igr, rzl[40], str[300]; if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, Crvena, "Niste ovlasceni."); if(sscanf(params, "us[40]", igr, rzl)) return SendClientMessage(playerid, COLOR_GRAD2, "{FF8040}CMD: {80FFFF}/kick [Id igraca/deo imena] [razlog]"); format(str, sizeof(str), "SERVER: Admin %s je kikao %s, razlog: %s.", GetName(playerid), GetName(igr), rzl); SendClientMessageToAll(Crvena, rzl); Kick(igr); return 1; }