vopojtepek 0 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Ahojte, vedel by mi niekto ukázať a vysvetliť ako by som spravil že hráč môže použiť prýkaz iba na určitom mieste ? Link to comment Share on other sites More sharing options...
0 Tanga 131 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Ahojte, vedel by mi niekto ukázať a vysvetliť ako by som spravil že hráč môže použiť prýkaz iba na určitom mieste ? -- Prýkaz hej? OK, tak ako s otázki plinie, stačí kontrolovať dany prýkaz na určitom miesťe. command(tvojprykaz,playerid,params[]) { if(IsPlayerInRangeOfPoint(playerid,5,x,y,z)) { //prýkaz return 1; } return SendClientMessage(playerid,0xFFFFFFFF,"Musíš biť na danom miesťe."); } Link to comment Share on other sites More sharing options...
0 vopojtepek 0 Odesláno: 8. Prosinec, 2013 Author Share Odesláno: 8. Prosinec, 2013 Ok ale kde to mám dať ? do OnPlayerCommandText ? Link to comment Share on other sites More sharing options...
0 Jakub Kučera 6 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Ne asi... Link to comment Share on other sites More sharing options...
0 vopojtepek 0 Odesláno: 8. Prosinec, 2013 Author Share Odesláno: 8. Prosinec, 2013 public OnPlayerCommandText(playerid, cmdtext[]){ if (strcmp("/lolka", cmdtext, true)==0) if(IsPlayerInRangeOfPoint(playerid,5,773.7617,-1511.3604,13.5504)) { //prýkaz return 1; } return SendClientMessage(playerid,0xFFFFFFFF,"Musíš biť na danom miesťe."); if (strcmp("/vozidlo", cmdtext, true)==0) { SendClientMessage(playerid, 0xFF0000AA, "Napíš : /vozidlo <meno_vozidla>"); return 1; } if (strcmp("/vozidlo infernus", cmdtext, true)==0) { new Float:x, Float:y, Float:z, Float:angle, color1, color2; if(GetPlayerMoney(playerid) < 200000) return SendClientMessage(playerid,0xff0000ff,"Nemáte dostatok penazí"); SendClientMessage(playerid,0x0000BBAA,"Kúpili ste si vozidlo infernus"); GetPlayerPos(playerid, x, y, z); CreateVehicle(411, x, y, z, angle, color1, color2, 0); GivePlayerMoney(playerid, -200000); return 1; } Píše mi tam Warning čo tam mám dať ?C:\Users\Pracovňa\Desktop\_\SA-MP Server\Drift\Drift.pwn(113) : warning 225: unreachable codePawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase1 Warning. Link to comment Share on other sites More sharing options...
0 VolfikCZ 33 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/lolka", cmdtext, true)==0) if(IsPlayerInRangeOfPoint(playerid,5,773.7617,-1511.3604,13.5504)) { //prýkaz return 1; } return SendClientMessage(playerid,0xFFFFFFFF,"Musíš biť na danom miesťe."); if (strcmp("/vozidlo", cmdtext, true)==0) { SendClientMessage(playerid, 0xFF0000AA, "Napíš : /vozidlo <meno_vozidla>"); return 1; } if (strcmp("/vozidlo infernus", cmdtext, true)==0) { new Float:x, Float:y, Float:z, Float:angle, color1, color2; if(GetPlayerMoney(playerid) < 200000) return SendClientMessage(playerid,0xff0000ff,"Nemáte dostatok penazí"); SendClientMessage(playerid,0x0000BBAA,"Kúpili ste si vozidlo infernus"); GetPlayerPos(playerid, x, y, z); CreateVehicle(411, x, y, z, angle, color1, color2, 0); GivePlayerMoney(playerid, -200000); return 1; } Píše mi tam Warning čo tam mám dať ? C:\Users\Pracovňa\Desktop\_\SA-MP Server\Drift\Drift.pwn(113) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/lolka", cmdtext, true)==0) { if(IsPlayerInRangeOfPoint(playerid,5,773.7617,-1511.3604,13.5504)) { //prýkaz return 1; } return SendClientMessage(playerid,0xFFFFFFFF,"Musíš bi na danom miese."); } return 0; } Link to comment Share on other sites More sharing options...
0 Tanga 131 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Pozri si ten návod na ZCMD, tu som ti našiel aj link. public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/lolka", cmdtext, true)==0) { if(IsPlayerInRangeOfPoint(playerid,5,773.7617,-1511.3604,13.5504)) { //prýkaz return 1; } return SendClientMessage(playerid,0xFFFFFFFF,"Musíš bi na danom miese."); } return 0; } --Finstar ty radšej neraď. Link to comment Share on other sites More sharing options...
0 play 0 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/lolka", cmdtext, true)==0) { if(IsPlayerInRangeOfPoint(playerid,5,773.7617,-1511.3604,13.5504)) { //Co se stane když příkaz zadá }else SendClientMessage(playerid,0xFFFFFFFF,"Musíš bi na danom miese."); return 1; } return 0; } Hej neměli by jste tu radši radit než jen pořád dávat link a nebo najdi si to na google ? Link to comment Share on other sites More sharing options...
0 Tanga 131 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Ja som dal hotový skript @play .Takže na mňa to dúfam neplatí. Link to comment Share on other sites More sharing options...
0 play 0 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Ale asi mu to moc nepomůže nemáš tam tu podmínku určité pozice :-) Link to comment Share on other sites More sharing options...
0 Tanga 131 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Tak si to prečítaj ešte raz.Citujem sám seba: command(tvojprykaz,playerid,params[]) { if(IsPlayerInRangeOfPoint(playerid,5,x,y,z)) { //prýkaz return 1; } return SendClientMessage(playerid,0xFFFFFFFF,"Musíš biť na danom miesťe."); } Link to comment Share on other sites More sharing options...
0 play 0 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Pozri si ten návod na ZCMD, tu som ti našiel aj link. -- Finstar ty radšej neraď. myslel jsem toto a nemáš tam chybu ? (já jen tak pro zvědavost abych věděl opravdu už jsem dlouho neprogramoval) nebude mu to psát i když bude na té pozici ? Link to comment Share on other sites More sharing options...
0 Cloudy 0 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 Já bych ti především doporučoval se naučit kde co má být, logicky si odvodit kde by to asi bylo.. a až pak se třeba ptát.. bez základu nemůžeš dělat nic Link to comment Share on other sites More sharing options...
0 Tanga 131 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 (upraveno) PlayCloudy Edited 8. Prosinec, 2013 by Tango Link to comment Share on other sites More sharing options...
0 play 0 Odesláno: 8. Prosinec, 2013 Share Odesláno: 8. Prosinec, 2013 To určitě všem pomůže když tu dáš svojí fotku Link to comment Share on other sites More sharing options...
Dotaz
vopojtepek 0
Ahojte, vedel by mi niekto ukázať a vysvetliť ako by som spravil že hráč môže použiť prýkaz iba na určitom mieste ?
Link to comment
Share on other sites
14 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