Guest [BJ]boban88 Odesláno: 26. Prosinec, 2010 Share Odesláno: 26. Prosinec, 2010 dcmd_vlozit(playerid, params[]) { if(IsPlayerInSphere(playerid,2194.7400,1994.8100,12.3000,15)|| IsPlayerInSphere(playerid,1682.2600,1441.5000,10.7700,15)|| IsPlayerInSphere(playerid,-1967.9700,308.7800,35.1700,15)) if(!strlen(params)) return SendClientMessage(playerid, COLOR_YELLOW, "[NAPIŠ]: /ulozit [Eástka]"); new castka2 = strval(params); if(castka2 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_RED, "Špatná eástka!"); if(castka2 <= GetPlayerMoney(playerid)){ bank[playerid] += castka2; GivePlayerMoney(playerid, -castka2); new string[256]; format(string, sizeof(string), "Uložil jsi: %d, zustatek na úetu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } dcmd_vybrat(playerid, params[]) { if(IsPlayerInSphere(playerid,2194.7400,1994.8100,12.3000,15)|| IsPlayerInSphere(playerid,1682.2600,1441.5000,10.7700,15)|| IsPlayerInSphere(playerid,-1967.9700,308.7800,35.1700,15)) if(!strlen(params)) return SendClientMessage(playerid, COLOR_YELLOW, "[NAPIŠ]: /vybrat [Eástka]"); new castka2 = strval(params); if(castka2 > bank[playerid]) return SendClientMessage(playerid, COLOR_RED, "Špatná eástka!"); if(castka2 <= bank[playerid]){ bank[playerid] -= castka2; GivePlayerMoney(playerid, castka2); new string[256]; format(string, sizeof(string), "Vybral jsi: %d, zustatek na úetu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } dcmd_stav(playerid, params[]) { #pragma unused params if(IsPlayerInSphere(playerid,2194.7400,1994.8100,12.3000,15)|| IsPlayerInSphere(playerid,1682.2600,1441.5000,10.7700,15)|| IsPlayerInSphere(playerid,-1967.9700,308.7800,35.1700,15)) new string[256]; format(string, sizeof(string), "Zustatek na vašem úetu einí: %d.", bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; } Link to comment Share on other sites More sharing options...
Yamaha 0 Odesláno: 26. Prosinec, 2010 Share Odesláno: 26. Prosinec, 2010 nnnn Link to comment Share on other sites More sharing options...
Guest [BJ]boban88 Odesláno: 26. Prosinec, 2010 Share Odesláno: 26. Prosinec, 2010 C:\Users\User2\Desktop\pawno2\include\GAM1.pwn(1703) : error 003: declaration of a local variable must appear in a compound block C:\Users\User2\Desktop\pawno2\include\GAM1.pwn(1703) : error 032: array index out of bounds (variable "string") riadky si mam vycucat ? Link to comment Share on other sites More sharing options...
Yamaha 0 Odesláno: 26. Prosinec, 2010 Share Odesláno: 26. Prosinec, 2010 NN uz som to opravil Dikes Link to comment Share on other sites More sharing options...
Guest roman2325 Odesláno: 27. Prosinec, 2010 Share Odesláno: 27. Prosinec, 2010 me to pise chyby: C:\Users\roman\Desktop\bars.pwn(1543) : error 017: undefined symbol "IsPlayerInSphere" C:\Users\roman\Desktop\bars.pwn(1559) : error 017: undefined symbol "IsPlayerInSphere" C:\Users\roman\Desktop\bars.pwn(1576) : error 017: undefined symbol "IsPlayerInSphere" Radky: dcmd_ulozit(playerid, params[]) { if (IsPlayerInSphere(playerid, -750.9552,491.7820,1371.7852,42) == 1){ //funguje jenom v danych souradnicich (napr pickupu) if(!strlen(params)) return SendClientMessage(playerid, COLOR_YELLOW, "[NAPIŠ]: /ulozit [Částka]"); new castka2 = strval(params); if(castka2 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_RED, "Špatná částka!"); if(castka2 <= GetPlayerMoney(playerid)){ bank[playerid] += castka2; GivePlayerMoney(playerid, -castka2); new string[256]; format(string, sizeof(string), "Uložil jsi: %d, zůstatek na účtu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } } return true; } dcmd_vybrat(playerid, params[]) { if (IsPlayerInSphere(playerid, -750.9552,491.7820,1371.7852,42) == 1){ //funguje jenom v danych souradnicich (napr pickupu) if(!strlen(params)) return SendClientMessage(playerid, COLOR_YELLOW, "[NAPIŠ]: /vybrat [Částka]"); new castka2 = strval(params); if(castka2 > bank[playerid]) return SendClientMessage(playerid, COLOR_RED, "Špatná částka!"); if(castka2 <= bank[playerid]){ bank[playerid] -= castka2; GivePlayerMoney(playerid, castka2); new string[256]; format(string, sizeof(string), "Vybral jsi: %d, zůstatek na účtu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } } return true; } dcmd_stav(playerid, params[]) { #pragma unused params if (IsPlayerInSphere(playerid, -750.9552,491.7820,1371.7852,42) == 1){ //funguje jenom v danych souradnicich (napr pickupu) new string[256]; format(string, sizeof(string), "Zůstatek na vašem účtu činí: %d.", bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } return true; } Link to comment Share on other sites More sharing options...
_NosiK_ 0 Odesláno: 27. Prosinec, 2010 Share Odesláno: 27. Prosinec, 2010 me to pise chyby:C:\Users\roman\Desktop\bars.pwn(1543) : error 017: undefined symbol "IsPlayerInSphere" C:\Users\roman\Desktop\bars.pwn(1559) : error 017: undefined symbol "IsPlayerInSphere" C:\Users\roman\Desktop\bars.pwn(1576) : error 017: undefined symbol "IsPlayerInSphere" Radky: dcmd_ulozit(playerid, params[]) { if (IsPlayerInSphere(playerid, -750.9552,491.7820,1371.7852,42) == 1){ //funguje jenom v danych souradnicich (napr pickupu) if(!strlen(params)) return SendClientMessage(playerid, COLOR_YELLOW, "[NAPIŠ]: /ulozit [Částka]"); new castka2 = strval(params); if(castka2 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_RED, "Špatná částka!"); if(castka2 <= GetPlayerMoney(playerid)){ bank[playerid] += castka2; GivePlayerMoney(playerid, -castka2); new string[256]; format(string, sizeof(string), "Uložil jsi: %d, zůstatek na účtu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } } return true; } dcmd_vybrat(playerid, params[]) { if (IsPlayerInSphere(playerid, -750.9552,491.7820,1371.7852,42) == 1){ //funguje jenom v danych souradnicich (napr pickupu) if(!strlen(params)) return SendClientMessage(playerid, COLOR_YELLOW, "[NAPIŠ]: /vybrat [Částka]"); new castka2 = strval(params); if(castka2 > bank[playerid]) return SendClientMessage(playerid, COLOR_RED, "Špatná částka!"); if(castka2 <= bank[playerid]){ bank[playerid] -= castka2; GivePlayerMoney(playerid, castka2); new string[256]; format(string, sizeof(string), "Vybral jsi: %d, zůstatek na účtu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } } return true; } dcmd_stav(playerid, params[]) { #pragma unused params if (IsPlayerInSphere(playerid, -750.9552,491.7820,1371.7852,42) == 1){ //funguje jenom v danych souradnicich (napr pickupu) new string[256]; format(string, sizeof(string), "Zůstatek na vašem účtu činí: %d.", bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); } return true; } najdi si definici IsPlayerInSphere Edit: spíš bych použil IsPlayerInRangeOfPoint(playerid, 2, -750.9552,491.7820,1371.7852); Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 fungue bez problemu,ani jedna chyba !! jenom jsme přepisoval color_yelow na žloutou atd.. jen bravy přepsat jinak to fungue,mam dotaz jak mam udělat aby ta tý pozici kde se to dá vybrat byla ikona $ ?? takový zelený S ? nebo jak to je ? a jak jich udělám víc těch bank ?? Link to comment Share on other sites More sharing options...
Petr 44 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 SetPlayerMapIcon, více na wiki. Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 SetPlayerMapIcon, více na wiki. si mě teda poradil Link to comment Share on other sites More sharing options...
Petr 44 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 Podíval ses aspoň na tu wiki? Co je na tom tak složitého akorát si doplnit parametry podle předlohy? Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 Podíval ses aspoň na tu wiki? Co je na tom tak složitého akorát si doplnit parametry podle předlohy? jj díky za tu wiki !! ja jsem na ní uplně zapoměl,díky,teď to du vyskoušet co s toho vzniklo a to jak přidám víc těch bank ?? protože tam je daný jenom jedna souřadnice ,jak tam přidám víc jen na tý souřadnici to de ,když du dál od ní tak 20 metru tak už to nefungue proto chci přidat víc souřadnic,poradíš ?? Link to comment Share on other sites More sharing options...
Petr 44 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1){ Změníš na: if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(..<-TVOJE PARAMETRY->..) == 1) { A doplníš si parametry podle sebe. Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 diky Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1){ Změníš na: if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(..<-TVOJE PARAMETRY->..) == 1) { A doplníš si parametry podle sebe. mužeš mě poslat celý řádek stav,uložit nebo vybrat ?? jeden znich nak mě to hazý erorry jestli jsem tam neudělal něco blbě dcmd_vybrat(playerid, params[]) { if (IsPlayerInSphere(playerid, -1519.3204,2610.3164,55.8359,15) == 1) { //funguje jenom v danych souradnicich (napr pickupu) if(!strlen(params)) return SendClientMessage(playerid, ZLUTA, "[NAPIŠ]: /vybrat [Částka]"); new castka2 = strval(params); if(castka2 > bank[playerid]) return SendClientMessage(playerid, CERVENA, "Špatná částka!"); if(castka2 <= bank[playerid]) { bank[playerid] -= castka2; GivePlayerMoney(playerid, castka2); new string[256]; format(string, sizeof(string), "Vybral jsi: %d, zůstatek na účtu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, ZLUTA, string); } } return true; } dcmd_stav(playerid, params[]) { #pragma unused params if (IsPlayerInSphere(playerid, -1519.3204,2610.3164,55.8359,15) == 1){ //funguje jenom v danych souradnicich (napr pickupu) new string[256]; format(string, sizeof(string), "Zůstatek na vašem účtu činí: %d.", bank[playerid]); SendClientMessage(playerid, ZLUTA, string); } return true; } Link to comment Share on other sites More sharing options...
Petr 44 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 Ukaž jak jsi to udělal ty, to bude lepší Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 Tady to je dcmd_ulozit(playerid, params[]) { if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1) { //funguje jenom v danych souradnicich (napr pickupu) if(!strlen(params)) return SendClientMessage(playerid, ZLUTA, "[NAPIŠ]: /ulozit [Částka]"); new castka2 = strval(params); if(castka2 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, CERVENA, "Špatná částka!"); if(castka2 <= GetPlayerMoney(playerid)) { bank[playerid] += castka2; GivePlayerMoney(playerid, -castka2); new string[256]; format(string, sizeof(string), "Uložil jsi: %d, zůstatek na účtu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, ZLUTA, string); } } return true; } dcmd_vybrat(playerid, params[]) { if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1) { { //funguje jenom v danych souradnicich (napr pickupu) if(!strlen(params)) return SendClientMessage(playerid, ZLUTA, "[NAPIŠ]: /vybrat [Částka]"); new castka2 = strval(params); if(castka2 > bank[playerid]) return SendClientMessage(playerid, CERVENA, "Špatná částka!"); if(castka2 <= bank[playerid]) { bank[playerid] -= castka2; GivePlayerMoney(playerid, castka2); new string[256]; format(string, sizeof(string), "Vybral jsi: %d, zůstatek na účtu: %d.", castka2, bank[playerid]); SendClientMessage(playerid, ZLUTA, string); } } return true; } dcmd_stav(playerid, params[]) { #pragma unused params if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1) { //funguje jenom v danych souradnicich (napr pickupu) new string[256]; format(string, sizeof(string), "Zůstatek na vašem účtu činí: %d.", bank[playerid]); SendClientMessage(playerid, ZLUTA, string); } return true; } a tyhle chyby C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(682) : error 017: undefined symbol "dcmd_stav" C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1304) : error 017: undefined symbol "dcmd_stav" C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1314) : error 030: compound statement not closed at the end of file (started at line 1288) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. Link to comment Share on other sites More sharing options...
Petr 44 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 1519.4808,1053.7301,10.8203,15) == 1) { { //funguje jenom v danych souradnicich (napr pickupu) Máš tady 2x "{", jednu smaž, kdyby jsi taboval, tak si toho všimneš hned, takhle to máš nepřehledné a těžko se v tom orientuje. Jo a proč máš všude ty samé souřadnice? Link to comment Share on other sites More sharing options...
G4NG 1 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 toto je fs a nie tut Ctrl+C a Ctrl+V akurat potrebne par uprav Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 1519.4808,1053.7301,10.8203,15) == 1) { { //funguje jenom v danych souradnicich (napr pickupu) Máš tady 2x "{", jednu smaž, kdyby jsi taboval, tak si toho všimneš hned, takhle to máš nepřehledné a těžko se v tom orientuje. Jo a proč máš všude ty samé souřadnice? plís pošli mi ten řádek jak má být,nevím si rady :shock: Link to comment Share on other sites More sharing options...
Petr 44 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 To je tak těžký smazat 1 "{"? Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 To je tak těžký smazat 1 "{"? thanks ,díky sorry ja jsem nak dneska spomalenje ,dík si dobrej učitel ! ještě jednou dík Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 jejda přidal jsem tam další a napsalo to tohle C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : warning 215: expression has no effect C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 001: expected token: ";", but found ")" C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. řadek if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, -243.3448,2710.1506,62.6875,15) == 1) || IsPlayerInSphere(playerid, 2193.4268,2002.1923,12.2894,15) == 1) Link to comment Share on other sites More sharing options...
Guest Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 jejda přidal jsem tam další a napsalo to tohle C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : warning 215: expression has no effect C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 001: expected token: ";", but found ")" C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. řadek if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, -243.3448,2710.1506,62.6875,15) == 1) || IsPlayerInSphere(playerid, 2193.4268,2002.1923,12.2894,15) == 1) asi to bude tohle: if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, -243.3448,2710.1506,62.6875,15) == 1) || IsPlayerInSphere(playerid, 2193.4268,2002.1923,12.2894,15) == 1) Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 jejda přidal jsem tam další a napsalo to tohle C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : warning 215: expression has no effect C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 001: expected token: ";", but found ")" C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. řadek if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, -243.3448,2710.1506,62.6875,15) == 1) || IsPlayerInSphere(playerid, 2193.4268,2002.1923,12.2894,15) == 1) asi to bude tohle: if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, -243.3448,2710.1506,62.6875,15) == 1) || IsPlayerInSphere(playerid, 2193.4268,2002.1923,12.2894,15) == 1) no ale kaj to mam plís opravit ? Link to comment Share on other sites More sharing options...
Guest Odesláno: 27. Listopad, 2011 Share Odesláno: 27. Listopad, 2011 jejda přidal jsem tam další a napsalo to tohle C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : warning 215: expression has no effect C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 001: expected token: ";", but found ")" C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : error 029: invalid expression, assumed zero C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(1271) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. řadek if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, -243.3448,2710.1506,62.6875,15) == 1) || IsPlayerInSphere(playerid, 2193.4268,2002.1923,12.2894,15) == 1) asi to bude tohle: if (IsPlayerInSphere(playerid, 1519.4808,1053.7301,10.8203,15) == 1 || IsPlayerInSphere(playerid, -243.3448,2710.1506,62.6875,15) == 1) || IsPlayerInSphere(playerid, 2193.4268,2002.1923,12.2894,15) == 1) no ale kaj to mam plís opravit ? chybí ti tam závorka --> viz to co je označený červeně porovnej s tim co je zeleně 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