Marwin37 5 Odesláno: 31. Srpen, 2009 Share Odesláno: 31. Srpen, 2009 Takže vytvořil jsem AFK System není to obyčejný AFK System je to AFK System ode mně a není jak ostatní ale je speciální Nahoru new AFK[MAX_PLAYERS]; //definice promene AFK new pName[28]; //Když už tento řadek máte tak nedávete new string[256]; //Když už tento řadek máte tak nedávete OnPlayerConnect AFK[playerid] = 0; Kamkoli do modu (ja osobně to dávám nad OnPlayerCommandText protože pak to je přehlednější) dcmd_afk(playerid,params[]) { // uděláme si příkaz /afk a otevřem závorku #pragma unused params // nepoužijem params, ale playerid jo ne aby jste to spletli if(AFK[playerid] == 0) { // jestliže je proměná AFK 0 GetPlayerName(playerid, pName, 28); //Vezme jmeno a dá ho do pName format(string, sizeof(string), "[ AFK ] %s (ID: %d) - Away From Keyboard", pName, playerid); //formát zprávy SendClientMessageToAll(COLOR_YELLOW, string); // odešle zprávu všem TogglePlayerControllable(playerid, 0); // znehybní hráče AFK[playerid] = 1; // dá proměnou AFK 1 }else if(AFK[playerid] == 1) { //kdyby jim to nestačilo a zadavali podruhé /afk SendClientMessage(playerid,COLOR_YELLOW,"[ AFK ] Jíž jsi AFK"); } return 1; // ukončení příkazu } OnPlayerCommandText dcmd(afk,3,cmdtext); //použití afk OnPlayerKeyStateChange if(AFK[playerid] > 0){ // jestliže je AFK větší jak 0 if(newkeys > -1 ){ // když hráč stiskne jakokoli definovanou klávesu TogglePlayerControllable(playerid, 1); // GetPlayerName(playerid, pName, 28); //Vezme jmeno a dá ho do pName format(string, sizeof(string), "[ AFK ] %s (ID: %d) - Je zpátky", pName, playerid); //formát zprávy SendClientMessageToAll(COLOR_YELLOW, string); // odešle zprávu všem AFK[playerid] = 0; } } ERRORs error 017: undefined symbol "COLOR_YELLOW" nahoru si dejte #define COLOR_YELLOW 0xFFFF00AA error 017: undefined symbol "dcmd" tak nahoru si dejte #define dcmd(%1,%2,%3) if((strcmp((%3)[1],#%1,true,(%2))==0)&&((((%3)[(%2)+1]==0)&&(dcmd_%1(playerid,"")))||(((%3)[(%2)+1]==32)&&(dcmd_%1(playerid,(%3)[(%2)+2]))))) return 1 doufám že vám TuT pomohl Link to comment Share on other sites More sharing options...
ATomas 291 Odesláno: 31. Srpen, 2009 Share Odesláno: 31. Srpen, 2009 do je dobrej napad :thumbup: ale myslis nestacilo by if(newkeys > -1 && newkeys < 17) ?? je to kradsi ale tak pro vsechny klavesy toto if(newkeys > -1) Link to comment Share on other sites More sharing options...
Marwin37 5 Odesláno: 31. Srpen, 2009 Author Share Odesláno: 31. Srpen, 2009 a vis ze i jo v tu chvili sem si neuvedomil jak to napsat xD Link to comment Share on other sites More sharing options...
癌癌癌 1 Odesláno: 31. Srpen, 2009 Share Odesláno: 31. Srpen, 2009 hh nice Link to comment Share on other sites More sharing options...
癌癌癌 1 Odesláno: 16. Září, 2009 Share Odesláno: 16. Září, 2009 Předem sry za double post ale ty by sis to asi jinak nepřečet: new string[256]; //Když už tento řadek máte tak nedávete - hmmm co když zrovna bude mi v tenokamžik kdy dam afk formatovat jinej a přeformatuje ho v ms.... stejně je pitomost mit proměnný nahoře... PS: délka stringu 256 zabírá příliš mnoho paměti v mašině ( by: chytrak ) Link to comment Share on other sites More sharing options...
FreeWall 3 Odesláno: 16. Září, 2009 Share Odesláno: 16. Září, 2009 PS: délka stringu 256 zabírá příliš mnoho paměti v mašině ( by: chytrak ) no tykrávo, aby ti ta pamět nepraskla, bacha na to Link to comment Share on other sites More sharing options...
癌癌癌 1 Odesláno: 16. Září, 2009 Share Odesláno: 16. Září, 2009 FreeWall":1i7a6ctn]PS: délka stringu 256 zabírá příliš mnoho paměti v mašině ( by: chytrak ) no tykrávo, aby ti ta pamět nepraskla, bacha na to ja tu vetu nevymyslel ... tak si dej 60stringů s delkou 256 na pipni Link to comment Share on other sites More sharing options...
FreeWall 3 Odesláno: 16. Září, 2009 Share Odesláno: 16. Září, 2009 jn, tak s pipni jdi víš kam Link to comment Share on other sites More sharing options...
癌癌癌 1 Odesláno: 16. Září, 2009 Share Odesláno: 16. Září, 2009 FreeWall":nnk4ygex]jn, tak s pipni jdi víš kam Ok tak jdu, no :D Link to comment Share on other sites More sharing options...
Marwin37 5 Odesláno: 16. Září, 2009 Author Share Odesláno: 16. Září, 2009 jaj a proc to resite tak at si kazdy nastavi string jaky bude chtit Link to comment Share on other sites More sharing options...
癌癌癌 1 Odesláno: 16. Září, 2009 Share Odesláno: 16. Září, 2009 jaj a proc to resite tak at si kazdy nastavi string jaky bude chtit Lama? Neví co to je... Proč by to teda upravovala? Link to comment Share on other sites More sharing options...
Marwin37 5 Odesláno: 16. Září, 2009 Author Share Odesláno: 16. Září, 2009 Jak je tu plno topicu lamy at se radeji nepousteji do modu Link to comment Share on other sites More sharing options...
Guest 25stenli75 Odesláno: 21. Září, 2009 Share Odesláno: 21. Září, 2009 D:\Documents and Settings\P@ľko\Plocha\ku hram\samp\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\P@ľko\Plocha\ku hram\samp\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\P@ľko\Plocha\ku hram\samp\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\P@ľko\Plocha\ku hram\samp\pawno\include\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\P@ľko\Plocha\ku hram\samp\pawno\include\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\P@ľko\Plocha\ku hram\samp\pawno\include\dutils.inc(379) : warning 219: local variable "string" shadows a variable at a preceding level D:\DOCUME~1\P@KO~1\Plocha\KUHRAM~1\samp\saleny.pwn(398) : error 017: undefined symbol "newkeys" D:\DOCUME~1\P@KO~1\Plocha\KUHRAM~1\samp\saleny.pwn(502) : warning 219: local variable "string" shadows a variable at a preceding level D:\DOCUME~1\P@KO~1\Plocha\KUHRAM~1\samp\saleny.pwn(569) : warning 219: local variable "string" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. pls help som totalna lama v pawno Link to comment Share on other sites More sharing options...
Guest pepo3333 Odesláno: 21. Září, 2009 Share Odesláno: 21. Září, 2009 Posli pwn opravim to Skype Pepo789 Link to comment Share on other sites More sharing options...
Scrash 0 Odesláno: 10. Říjen, 2009 Share Odesláno: 10. Říjen, 2009 D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\include\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\include\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\include\dutils.inc(379) : warning 219: local variable "string" shadows a variable at a preceding level D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\PWN\epower.pwn(908) : error 017: undefined symbol "playerid" D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\PWN\epower.pwn(914) : error 017: undefined symbol "playerid" D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\PWN\epower.pwn(915) : error 017: undefined symbol "newkeys" D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\PWN\epower.pwn(916) : error 017: undefined symbol "playerid" D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\PWN\epower.pwn(917) : error 017: undefined symbol "playerid" D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\PWN\epower.pwn(918) : error 017: undefined symbol "playerid" D:\Documents and Settings\Jarča\Plocha\SAMP2\pawno\PWN\epower.pwn(920) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 7 Errors. Nevim, co tomu jeb... includ dutils tam mam, nechapu cim to je Link to comment Share on other sites More sharing options...
Marwin37 5 Odesláno: 11. Říjen, 2009 Author Share Odesláno: 11. Říjen, 2009 Kde si to hazel vole ze nemas nadefinovany playerid napis tu radky Link to comment Share on other sites More sharing options...
chocholda 0 Odesláno: 6. Listopad, 2009 Share Odesláno: 6. Listopad, 2009 zdarte lidi, pls, poradte mi, haže mi to tyhle chybu a mam všecko jako v navoďe ;-) (teda snad xD) K:\pawno\casti\AFK.pwn(149) : error 017: undefined symbol "newkeys" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. předem díky za radu co s tím ;-) Link to comment Share on other sites More sharing options...
Roox 1 Odesláno: 6. Listopad, 2009 Share Odesláno: 6. Listopad, 2009 public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(AFK[playerid] > 0){ // jestliže je AFK větší jak 0 if(newkeys > -1 ){ // když hráč stiskne jakokoli definovanou klávesu TogglePlayerControllable(playerid, 1); // GetPlayerName(playerid, pName, 28); //Vezme jmeno a dá ho do pName format(string, sizeof(string), "[ AFK ] %s (ID: %d) - Je zpátky", pName, playerid); //formát zprávy SendClientMessageToAll(COLOR_YELLOW, string); // odešle zprávu všem AFK[playerid] = 0; } } } Link to comment Share on other sites More sharing options...
chocholda 0 Odesláno: 6. Listopad, 2009 Share Odesláno: 6. Listopad, 2009 omlouvám se, neumim číst :D:D Link to comment Share on other sites More sharing options...
Roox 1 Odesláno: 6. Listopad, 2009 Share Odesláno: 6. Listopad, 2009 Jo a Scrash musis si na to poupravit dutils, nebo to co mas v modu...se koukni na to odkad ti to cte ten error ne ? xD Link to comment Share on other sites More sharing options...
Guest LuCkY Odesláno: 8. Listopad, 2009 Share Odesláno: 8. Listopad, 2009 :-D me to zas hlasi toto C:\Users\David\Desktop\SF.pwn(382) : error 017: undefined symbol "AFK" C:\Users\David\Desktop\SF.pwn(382) : warning 215: expression has no effect C:\Users\David\Desktop\SF.pwn(382) : error 001: expected token: ";", but found "]" C:\Users\David\Desktop\SF.pwn(382) : error 029: invalid expression, assumed zero C:\Users\David\Desktop\SF.pwn(382) : fatal error 107: too many error messages on one line Řádek 382: AFK[playerid] = 0; pls pomoct :-D Link to comment Share on other sites More sharing options...
zpatecnik 0 Odesláno: 8. Listopad, 2009 Share Odesláno: 8. Listopad, 2009 mas nahore new AFK[MAX_PLAYERS]; Link to comment Share on other sites More sharing options...
Guest LuCkY Odesláno: 8. Listopad, 2009 Share Odesláno: 8. Listopad, 2009 jj mam Link to comment Share on other sites More sharing options...
Jean 0 Odesláno: 8. Listopad, 2009 Share Odesláno: 8. Listopad, 2009 Marwine dobrej afk system, uz me neco takovyho napadlo ale byl sem linej Trochu si to poupravim a jepsi bude dat na to afk timer napr 10sec aby toho nekdo nezneuzival Hotovo, podtrzeno: dobrej tut Link to comment Share on other sites More sharing options...
Guest [TFC]M4r3k Odesláno: 15. Prosinec, 2009 Share Odesláno: 15. Prosinec, 2009 1error pls help (653) : error 017: undefined symbol "newkeys" Řádek 653:if(newkeys > -1 ){ Link to comment Share on other sites More sharing options...
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