12.12.2016, 07:03
Sup!
So i was wondering why me script doesn't functional when i type /mute player_name time reason, its just always repeat the same message like if you want mute player use /mute player_name time reason and blablabla, though i type everything like name, time and reason its just doesn't work
Here me code
Can you say why its doesn't response?
So i was wondering why me script doesn't functional when i type /mute player_name time reason, its just always repeat the same message like if you want mute player use /mute player_name time reason and blablabla, though i type everything like name, time and reason its just doesn't work
Here me code
Код:
CMD:mute(playerid,params[]) { if(zInfo[playerid][AdminLevel]<2) return 0; new player[MAX_PLAYER_NAME],priezastis[30],time,msg[140],zaidejoID,name[MAX_PLAYER_NAME],names[MAX_PLAYER_NAME],msgss[240],msgs[40]; if(sscanf(params,"zds",player,time,priezastis)) return InfoBoxForPlayer(playerid,"~y~Mute player ~r~/mute (Name_Name)(Sec)~n~(Reason)"); zaidejoID = GetPlayeridMid( player ); if(zaidejoID == playerid) return InfoBoxForPlayer(playerid,"~r~You can't mute your self."); if(zInfo[zaidejoID][mutelaikas]>0) return InfoBoxForPlayer(playerid,"~r~Player already muted"); if(zaidejoID == INVALID_PLAYER_ID) return InfoBoxForPlayer(playerid,"~r~This player doesn't exist."); if(zInfo[playerid][Savininkas]==0) { if(zInfo[zaidejoID][AdminLevel]!=0 || zInfo[zaidejoID][Savininkas]!=0) return InfoBoxForPlayer(playerid,"~r~You can't mute admin."); } if(time > 5000) return InfoBoxForPlayer(playerid,"~y~Time to long~n~ ~r~(MAX - 5000sec)."); GetPlayerName(playerid,name,sizeof(name)); GetPlayerName(zaidejoID,names,sizeof(names)); zInfo[zaidejoID][mutelaikas]+=time; format(msgss,240,"[Mute] Admin %s muted player %s reason: {00CC00}%s",name,names,priezastis); SendClientMessageToAll(0xFF0000FF,msgss); format(msg,sizeof(msg),"{FF0000}You was muted: {DC00FF}%d {FF0000}sec. For {DC00FF}%s. {FF0000}You got muted be: {FFD400}%s",time,priezastis,name); SendClientMessage(zaidejoID,-1,msg); MuteTime[zaidejoID] = SetTimerEx("Mute", 1000, 1, "i", zaidejoID); format(msgs,sizeof(msgs),"Mute: %d sek.",zInfo[zaidejoID][mutelaikas]); SetPlayerChatBubble(zaidejoID, msgs, 0xFF0000FF, 20.0, 2000); return 1; }