Niki 1 Odesláno: 28. Březen, 2014 Share Odesláno: 28. Březen, 2014 Zdravím,mám menší problem s príkazom /ban. Všetko funguje len nenapíše dôvod len medzeru vedel by mi niekto prosím vás pomôcť ? COMMAND:ban(playerid, params[]) { new string[128]; new ID; new id = strval(params[0]); new dovod = strval(params[1]); if(alevel[playerid] < 1) return SCM(playerid, RED,"[ ! ] Nemáš dostatočné Admin Práva"); { if(sscanf(params, "i", ID)) { SCM(playerid, RED, "Použi: /ban [ID] [Dôvod]"); return 1; } if(!IsPlayerConnected(ID)) { SCM(playerid, RED, "Hráč s týmto id neni online"); return 1; } format(string, sizeof(string), "Administrátor %s zabanoval hráča %s [Dôvod: %d]",PlayerName(playerid),PlayerName(id),dovod); SCMTA(Admin, string); BanEx(ID, string); return 1; } } Link to comment Share on other sites More sharing options...
0 kell94_cz 7 Odesláno: 28. Březen, 2014 Share Odesláno: 28. Březen, 2014 COMMAND:ban(playerid, params[]) { new string[128],id,dovod[50]; if(alevel[playerid] < 1) return SCM(playerid,RED,"[ ! ] Nemáš dostatečné Admin Práva"); if(sscanf(params,"iz",id,dovod)) return SCM(playerid,RED,"Použi: /ban [ID] [Dovod]"); if(!IsPlayerConnected(id)) return SCM(playerid,RED,"Hráč s týmto id neni online"); format(string,sizeof(string),"Administrátor %s zabanoval hráča %s [Dovod: %s]",PlayerName(playerid),PlayerName(id),dovod); SCMTA(Admin,string); BanEx(id,string); return 1; } U důvodu musíš mít vždy počet znaků velikost pole kolik toho můžeš napsat žádný strval v tom jsi měl chybu a ještě jsi tam měl zbytečně tu proměnnou new id = strval(params[0]); stačí normálně jenom new id; a hotovo no a ještě jsi tam měl tu nadbytečnou proměnnou new ID; ta je tam zbytečná. Link to comment Share on other sites More sharing options...
0 Niki 1 Odesláno: 28. Březen, 2014 Author Share Odesláno: 28. Březen, 2014 Okey dík funguje. Link to comment Share on other sites More sharing options...
Dotaz
Niki 1
Zdravím,mám menší problem s príkazom /ban.
Všetko funguje len nenapíše dôvod len medzeru vedel by mi niekto prosím vás pomôcť ?
Link to comment
Share on other sites
2 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