AdoUMfsamp 1 Odesláno: 9. Prosinec, 2015 Share Odesláno: 9. Prosinec, 2015 cautem,potrebejem radu ako mam urobit ze ked si auto vitvorim tak nech ho rovno hodi do auta cod ako to mam ale porebujem to tak ked ma to tam teleportne tam vitvori auto rovno ma don ho getne *sry za gramatiku som uz stoho na nervy if(IsPlayerInRangeOfPoint(playerid, 1, 2526.7527,-1678.6660,3682.5388)) { GameTextForPlayer(playerid,"Vybral si si blistu.Prijemnu hru.", 5000, 3); CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60);//blista SetPlayerPos(playerid,1965.1685,1764.1351,18.9339); } Link to comment Share on other sites More sharing options...
0 SkP_Teddy 0 Odesláno: 9. Prosinec, 2015 Share Odesláno: 9. Prosinec, 2015 použi PutPlayerInVehicle(...); Link to comment Share on other sites More sharing options...
0 AdoUMfsamp 1 Odesláno: 9. Prosinec, 2015 Author Share Odesláno: 9. Prosinec, 2015 skusim public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 1, 2526.7527,-1678.6660,3682.5388)) { GameTextForPlayer(playerid,"Vybral si si blistu.Prijemnu hru.", 5000, 3); CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60);//blista SetPlayerPos(playerid,1965.1685,1764.1351,18.9339); PutPlayerInVehicle(playerid,496,0); } if(IsPlayerInRangeOfPoint(playerid, 1, 2524.7017,-1678.5266,3683.3388)) { SetPlayerPos(playerid,1965.1685,1764.1351,18.9339); GameTextForPlayer(playerid,"Vybral si si feltzer.Prijemnu hru.", 5000, 3); PutPlayerInVehicle(playerid,533,0); } if(IsPlayerInRangeOfPoint(playerid, 1, 2522.0200,-1678.5378,3683.3388)) { SetPlayerPos(playerid,1965.1685,1764.1351,18.9339); GameTextForPlayer(playerid,"Vybral si si club.prijemnu hru.", 5000, 3); PutPlayerInVehicle(playerid,589,0); } return 1; } skusal som asi to mam zle alebo nwm nejdeto Link to comment Share on other sites More sharing options...
0 Amenadiel 286 Odesláno: 9. Prosinec, 2015 Share Odesláno: 9. Prosinec, 2015 (upraveno) skusim public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 1, 2526.7527,-1678.6660,3682.5388)) { GameTextForPlayer(playerid,"Vybral si si blistu.Prijemnu hru.", 5000, 3); CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60);//blista SetPlayerPos(playerid,1965.1685,1764.1351,18.9339); PutPlayerInVehicle(playerid,496,0); } if(IsPlayerInRangeOfPoint(playerid, 1, 2524.7017,-1678.5266,3683.3388)) { SetPlayerPos(playerid,1965.1685,1764.1351,18.9339); GameTextForPlayer(playerid,"Vybral si si feltzer.Prijemnu hru.", 5000, 3); PutPlayerInVehicle(playerid,533,0); } if(IsPlayerInRangeOfPoint(playerid, 1, 2522.0200,-1678.5378,3683.3388)) { SetPlayerPos(playerid,1965.1685,1764.1351,18.9339); GameTextForPlayer(playerid,"Vybral si si club.prijemnu hru.", 5000, 3); PutPlayerInVehicle(playerid,589,0); } return 1; } skusal som asi to mam zle alebo nwm nejdeto udělej to takto PutPlayerInVehicle(playerid, CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60), 0); Edited 9. Prosinec, 2015 by Steam Wallet 1 Link to comment Share on other sites More sharing options...
0 SkP_Teddy 0 Odesláno: 9. Prosinec, 2015 Share Odesláno: 9. Prosinec, 2015 if(IsPlayerInRangeOfPoint(playerid, 1, 2526.7527,-1678.6660,3682.5388)) { GameTextForPlayer(playerid,"Vybral si si blistu.Prijemnu hru.", 5000, 3); new auto; auto = CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60);//blista //portovať ho nemusíš PutPlayerInVehicle(playerid,auto,0); } alebo takto Link to comment Share on other sites More sharing options...
0 Amenadiel 286 Odesláno: 9. Prosinec, 2015 Share Odesláno: 9. Prosinec, 2015 (upraveno) if(IsPlayerInRangeOfPoint(playerid, 1, 2526.7527,-1678.6660,3682.5388)) { GameTextForPlayer(playerid,"Vybral si si blistu.Prijemnu hru.", 5000, 3); new auto; auto = CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60);//blista //portovať ho nemusíš PutPlayerInVehicle(playerid,auto,0); } alebo takto jasný budem dělat zbytečné proměné... proč ne když už zbytečně natahuješ kod.. tak alespon takto new auto = CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60);//blista Edited 9. Prosinec, 2015 by Steam Wallet Link to comment Share on other sites More sharing options...
0 AdoUMfsamp 1 Odesláno: 9. Prosinec, 2015 Author Share Odesláno: 9. Prosinec, 2015 udělej to takto PutPlayerInVehicle(playerid, CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60), 0); Diki bro ale mesto to ho aby mi 1 auto vitvorilo tak ich vitvori asi 5 Link to comment Share on other sites More sharing options...
0 Amenadiel 286 Odesláno: 9. Prosinec, 2015 Share Odesláno: 9. Prosinec, 2015 Diki bro ale mesto to ho aby mi 1 auto vitvorilo tak ich vitvori asi 5 pošli foto + code. kde přesně to dělá. 1 Link to comment Share on other sites More sharing options...
0 AdoUMfsamp 1 Odesláno: 9. Prosinec, 2015 Author Share Odesláno: 9. Prosinec, 2015 pošli foto + code. kde přesně to dělá. public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 1, 2526.7527,-1678.6660,3682.5388)) { PutPlayerInVehicle(playerid, CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60), 0); GameTextForPlayer(playerid,"Vybral si si blistu.Prijemnu hru.", 5000, 3); } if(IsPlayerInRangeOfPoint(playerid, 1, 2524.7017,-1678.5266,3683.3388)) { PutPlayerInVehicle(playerid, CreateVehicle(533, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60), 0); GameTextForPlayer(playerid,"Vybral si si feltzer.Prijemnu hru.", 5000, 3); } if(IsPlayerInRangeOfPoint(playerid, 1, 2522.0200,-1678.5378,3683.3388)) { PutPlayerInVehicle(playerid, CreateVehicle(589, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60), 0); GameTextForPlayer(playerid,"Vybral si si club.prijemnu hru.", 5000, 3); } return 1; } Link to comment Share on other sites More sharing options...
0 Amenadiel 286 Odesláno: 9. Prosinec, 2015 Share Odesláno: 9. Prosinec, 2015 (upraveno) jasný... proč to sakra daváš do onplayerupdate?? se nediv že to tam máš 5x pokud to chceš mít jako že nastoupí do auta tak si to dej do https://wiki.sa-mp.com/wiki/OnPlayerEnterVehicle nebo si to udělej před dialog. Edited 9. Prosinec, 2015 by Steam Wallet 2 Link to comment Share on other sites More sharing options...
0 AdoUMfsamp 1 Odesláno: 9. Prosinec, 2015 Author Share Odesláno: 9. Prosinec, 2015 Dik uz vem Link to comment Share on other sites More sharing options...
0 ATomas 288 Odesláno: 10. Prosinec, 2015 Share Odesláno: 10. Prosinec, 2015 jasný budem dělat zbytečné proměné... proč ne když už zbytečně natahuješ kod.. tak alespon takto new auto = CreateVehicle(496, 1965.1685,1764.1351,18.9339, 82.2873, -1, -1, 60);//blista jake zbytecne promene ? vsak jakmile to vyjede z te urvone ({ }) tak to promenou smaze. Link to comment Share on other sites More sharing options...
0 Amenadiel 286 Odesláno: 10. Prosinec, 2015 Share Odesláno: 10. Prosinec, 2015 (upraveno) jake zbytecne promene ? vsak jakmile to vyjede z te urvone ({ }) tak to promenou smaze. je to zbytečné to tam dělat pokud to nechce využít na tuning třeba. vím že se smaže ale i tak udělal 2 zbytečné řádky když to šlo na jeden oto mi šlo. prostě podle mě je to strašná kravina tam dělat proměnu když to chce využít jenom na posazení hráče do auta. zbytečně si kód natahuje pak a je více nepřehledný. Edited 10. Prosinec, 2015 by Steam Wallet Link to comment Share on other sites More sharing options...
0 Wertix 1 Odesláno: 10. Prosinec, 2015 Share Odesláno: 10. Prosinec, 2015 je to zbytečné to tam dělat pokud to nechce využít na tuning třeba. vím že se smaže ale i tak udělal 2 zbytečné řádky když to šlo na jeden oto mi šlo. prostě podle mě je to strašná kravina tam dělat proměnu když to chce využít jenom na posazení hráče do auta. zbytečně si kód natahuje pak a je více nepřehledný. To už záleží ale na něm né? Jak se mu to líbí, já tedy preferuji to s tou tvorbou proměnné, a né to co jsi psal, to je pro mě nepřehledné. Link to comment Share on other sites More sharing options...
0 ATomas 288 Odesláno: 15. Prosinec, 2015 Share Odesláno: 15. Prosinec, 2015 je to zbytečné to tam dělat pokud to nechce využít na tuning třeba. vím že se smaže ale i tak udělal 2 zbytečné řádky když to šlo na jeden oto mi šlo. prostě podle mě je to strašná kravina tam dělat proměnu když to chce využít jenom na posazení hráče do auta. zbytečně si kód natahuje pak a je více nepřehledný. To je stejne uplne bezpredmetne, protoze je vyhrazena pamet pro operace (#pragma dynamic ..) pokud se nepletu, takze uz je uplne jedno jestli ji vyuzijes nebo ne.Tak jako ta musi byt uvolnena pro spravny beh scriptu. Pomoci toho pragmatu si ji muzes zvysit/zmensit podle potreb a moznosti hadrwaru. Tam je dulezity aby sis pamet nevycerpal (rekurze) a nebo sis nastavil dostatecnou velikost, coz kdyz si nastavujes velikost, tak musis vedet ze mas dost velke RAM a ze ti to nebude zrat jina aplikace. Link to comment Share on other sites More sharing options...
Dotaz
AdoUMfsamp 1
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