Tedy 8 Odesláno: 27. Srpen, 2014 Share Odesláno: 27. Srpen, 2014 Ahoj,chtěl jsem se zptat zda by mi někdo pomohl udělat mute na čas? Díky moc Link to comment Share on other sites More sharing options...
0 LosO 5 Odesláno: 27. Srpen, 2014 Share Odesláno: 27. Srpen, 2014 Snáď nečakáš že ti sem hned niekdo napíše kod. Prejav aspoň snahu a pomôžem ti Link to comment Share on other sites More sharing options...
0 Tedy 8 Odesláno: 27. Srpen, 2014 Author Share Odesláno: 27. Srpen, 2014 Nečekám..háže mi to erory - hned sem dám kod Kod> dcmd(mute,4,cmdtext); dcmd_mute(playerid, params[]) { new id = strval(params),string[128],minuty,duvod[25]; if(adminlevel[playerid] >= 1) { if(sscanf(params,"udz",id,minuty,duvod)) return ShowPlayerDialog(playerid,14,DIALOG_STYLE_MSGBOX,"Upozornění","Použití: /mute ID ČAS[MINUTY] DŮVOD","Potvrdit",""); else if(!IsPlayerConnected(id)) return nepripojeny(playerid); else SetPVarInt(id,"muted",1); SetTimerEx("mutex",minuty*60000,0,"i",id); format(string,sizeof(string),"Administrátor %s umlčel hráče %s na %d minut z důvodu:%s",PlayerName(playerid),PlayerName(id),minuty,duvod); SendClientMessageToAll(B_CERV,string); SendClientMessage(id,B_MODR,"Byl jste umlčen!"); }else nizkylevel(playerid); return 1; } Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 27. Srpen, 2014 Share Odesláno: 27. Srpen, 2014 public mutex(playerid) { if(GetPVarInt(playerid,"muted") ==1) { SetPVarInt(playerid,"muted",0); SendClientMessage(playerid,0x33ccffaa,"Byl jste odmlčen!"); } return true; } public OnPlayerText(playerid, text[]) { if(strlen(text) > 120) { SendClientMessage(playerid, 0xFFFFFFFF, "Text je příliš dlouhý! Maximálne můžeš použít 120 písmen"); return 0; } else if(GetPVarInt(playerid,"muted") == 1) { ShowPlayerDialog(playerid,20,DIALOG_STYLE_MSGBOX,"Upozornění","Jste umlčen!","Potvrdit",""); return 0; } return 1; } dcmd_mute(playerid, params[]) { #pragma unused params new id = strval(params),string[128],minuty,duvod[25]; { if(sscanf(params,"udz",id,minuty,duvod)) return ShowPlayerDialog(playerid,14,DIALOG_STYLE_MSGBOX,"Upozornění","Použití: /mute ID ČAS[MINUTY] DŮVOD","Potvrdit",""); else if(!IsPlayerConnected(id)) return SCM(playerid,0xff0000ff,"[ ! ] {ffffff} Tento hrač neni na serveru"); else SetPVarInt(id,"muted",1); SetTimerEx("mutex",minuty*60000,0,"i",id); format(string,sizeof(string),"Administrátor %s umlčel hráče %s na %d minut z důvodu:%s",PlayerName(playerid),PlayerName(id),minuty,duvod); SendClientMessageToAll(0x33ccffaa,string); SendClientMessage(id,0xff0000ff,"Byl jste umlčen!"); } return 1; } dcmd_unmute(playerid, params[]) { #pragma unused params new id = strval(params); { if(sscanf(params,"u",id)) return ShowPlayerDialog(playerid,14,DIALOG_STYLE_MSGBOX,"Upozornění","Použití: /unmute ID","Potvrdit",""); else if(!IsPlayerConnected(id)) return SCM(playerid,0xff0000ff,"[ ! ] {ffffff} Tento hrač neni na serveru"); else if(GetPVarInt(id,"muted") == 0) return ShowPlayerDialog(playerid,23,DIALOG_STYLE_MSGBOX,"Upozornění","Hráč není umlčený!","Potvrdit",""); else SetPVarInt(id,"muted",0); new string[255]; format(string,sizeof(string),"Administrátor %s odmlčel hráče %s!",PlayerName(playerid),PlayerName(id)); SendClientMessageToAll(0xff0000ff,string); SendClientMessage(id,0x33ccffaa,"Byl jste odmlčen!"); } return 1; } Skus toto ( NIEJE TO MOJA TVORBA ) Link to comment Share on other sites More sharing options...
0 Tedy 8 Odesláno: 27. Srpen, 2014 Author Share Odesláno: 27. Srpen, 2014 C:\Users\pc\Desktop\Untitled.pwn(43) : warning 235: public function lacks forward declaration (symbol "mutex") C:\Users\pc\Desktop\Untitled.pwn(43 -- 3) : error 017: undefined symbol "GetPVarInt" C:\Users\pc\Desktop\Untitled.pwn(5) : error 017: undefined symbol "SetPVarInt" C:\Users\pc\Desktop\Untitled.pwn(6) : warning 217: loose indentation C:\Users\pc\Desktop\Untitled.pwn(6) : error 017: undefined symbol "SendClientMessage" C:\Users\pc\Desktop\Untitled.pwn(11) : warning 235: public function lacks forward declaration (symbol "OnPlayerText") C:\Users\pc\Desktop\Untitled.pwn(13) : error 017: undefined symbol "strlen" C:\Users\pc\Desktop\Untitled.pwn(15) : error 017: undefined symbol "SendClientMessage" C:\Users\pc\Desktop\Untitled.pwn(18) : error 017: undefined symbol "GetPVarInt" C:\Users\pc\Desktop\Untitled.pwn(20) : error 017: undefined symbol "ShowPlayerDialog" C:\Users\pc\Desktop\Untitled.pwn(43) : warning 203: symbol is never used: "dcmd_mute" C:\Users\pc\Desktop\Untitled.pwn(43 -- 62) : warning 203: symbol is never used: "dcmd_unmute" Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 27. Srpen, 2014 Share Odesláno: 27. Srpen, 2014 (upraveno) forward mutex(playerid); CHYBA : if(GetPVarInt(playerid,"muted") ==1) OPRAVA : if(GetPVarInt(playerid,"muted") == 1) public OnPlayerCommandText(playerid,cmdtext[]) { dcmd(mute,4,cmdtext); dcmd(unmute,6,cmdtext); return 1; } Edited 27. Srpen, 2014 by INSANE_25_ICON Link to comment Share on other sites More sharing options...
0 Tedy 8 Odesláno: 27. Srpen, 2014 Author Share Odesláno: 27. Srpen, 2014 Nefunguje zase erory Link to comment Share on other sites More sharing options...
0 Mort 29 Odesláno: 27. Srpen, 2014 Share Odesláno: 27. Srpen, 2014 Zkus přemýšlet logicky. Přeložit si errory, zkusit opravit. Programovat se nenaučíš za 10 minut:) Kdysi jsem tady psal návod na Timery, je zde: http://pawno.cz/topic/39860-timer/ Mrkni se na SetTimerEx, ten by ti mohl pomoct. Jestli ne, tak se omlouvám, pawno jsem nedělal 2 roky;) Proč to neudělat složitě, když to jde jednoduše, co? Link to comment Share on other sites More sharing options...
Dotaz
Tedy 8
Ahoj,chtěl jsem se zptat zda by mi někdo pomohl udělat mute na čas? Díky moc
Link to comment
Share on other sites
7 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now