12.03.2012, 16:52
I have problem with my script, i started making it from 0 but i got trouble with mute command, command is working but it won't show reason in chat...
it just stays empty like
Administrator Tom_Smith je oduzeo pravo govora igracu Tom_Smith. [Reason:]
Look down there in code and help me please, and sory for language
it just stays empty like
Administrator Tom_Smith je oduzeo pravo govora igracu Tom_Smith. [Reason:]
Look down there in code and help me please, and sory for language
Код:
CMD:mute(playerid,params[]) { new id, name1[30], name2[30], reason[50], text[128]; if(sscanf(params,"u",id, reason)) return SendClientMessage(playerid, 0xFF9900AA,"Koristenje: /mute [ID/dio imena] [Reason]"); if(PlayerInfo[playerid][pAdminLevel] >= 2) { if(IsPlayerConnected(id)) { if(PlayerInfo[id][pAdminLevel] <= PlayerInfo[playerid][pAdminLevel]) { if(PlayerInfo[playerid][pMute] == 0) { GetPlayerName(playerid,name1,sizeof(name1)); GetPlayerName(id,name2,sizeof(name2)); format(text,sizeof(text),"Administrator %s je oduzeo pravo govora igracu %s. [Reason: %s]",name1,name2, reason); SendClientMessageToAll(red,text); PlayerInfo[id][pMute] = 1; new command[30]; format(command,sizeof(command),"unmute(%i)",id); } else { return SendClientMessage(playerid, 0xFF0000FF,"Greska: Igracu je vec oduzeto pravo govora."); } } else { return SendClientMessage(playerid, 0xFF0000FF,"Greska: Nemozete oduzeti pravo govora adminu veceg levela."); } } else { return SendClientMessage(playerid,0xFF0000FF,"Greska: ID/dio imena koji ste upisali nije ispravan."); } } else { return SendClientMessage(playerid, 0xFF0000FF,"Greska: Ovu komandu mogu koristiti samo admini level 2 ili vise."); } return 1; }