gouster 0 Odesláno: 14. Listopad, 2016 Share Odesláno: 14. Listopad, 2016 (upraveno) #define SCM SendClientMessage QCMD:tp(){ tp(playerid,params); return 1; } stock tp(playerid, params[]){ new Float:x, Float:y, Float:z, id1, id2; if(sscanf(params, "ifff", id1, x, y, z)) { if(sscanf(params, "fff", x, y, z)) { if(sscanf(params, "ii", id1, id2)) { if(sscanf(params, "i", id1)) SCM(playerid,-1,"Použi: /tp ID X Y Z | /tp X Y Z | /tp ID ID | /tp ID"); else { if(playerid == id1) return SCM(playerid,-1,"Nemôžeš sa teleportovať sám na seba"); if(!IsPlayerConnected(id1)) return SCM(playerid,-1,"Hráč nieje pripojený"); GetPlayerPos(id1, x, y, z); SetPlayerPos(playerid, x, y, z); } } else { if(id2 == playerid && id1 == playerid) return SCM(playerid,-1,"Nemôžeš sa teleportovať sám na seba"); if(id1 == id2) return SCM(playerid,-1,"Nemôžeš teleportovať hráča na seba samého"); if(!IsPlayerConnected(id1)) return SCM(playerid,-1,"Hráč nieje pripojený"); if(!IsPlayerConnected(id2)) return SCM(playerid,-1,"Hráč nieje pripojený"); GetPlayerPos(id2, x, y, z); SetPlayerPos(id1, x, y, z); } } else { SetPlayerPos(playerid, x, y, z); } } else { if(!IsPlayerConnected(id1)) return SCM(playerid,-1,"Hráč nieje pripojený"); SetPlayerPos(id1, x, y, z); } return 1; } http://wiki.sa-mp.com/wroot/index.php?title=Sscanf_code Edited 14. Listopad, 2016 by gouster Link to comment Share on other sites More sharing options...
Amenadiel 286 Odesláno: 15. Listopad, 2016 Share Odesláno: 15. Listopad, 2016 (upraveno) To chceš pomoc nebo co ? nějak nechápu smysl Edited 15. Listopad, 2016 by Steam wallet Link to comment Share on other sites More sharing options...
arci224 11 Odesláno: 15. Listopad, 2016 Share Odesláno: 15. Listopad, 2016 To chceš pomoc nebo co ? nějak nechápu smysl Jedná se o scripz takže nepotřebuje z Link to comment Share on other sites More sharing options...
Amenadiel 286 Odesláno: 15. Listopad, 2016 Share Odesláno: 15. Listopad, 2016 Jedná se o scripz takže nepotřebuje z Dost lidí si plete sekce.. takže bych se nedivil kdyby on taky. Link to comment Share on other sites More sharing options...
gouster 0 Odesláno: 16. Listopad, 2016 Author Share Odesláno: 16. Listopad, 2016 To chceš pomoc nebo co ? nějak nechápu smysl Nie. je to funkcne, ak by niekto potreboval, tak moze pouzit. 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