Paulee 16 Odesláno: 9. Květen, 2015 Share Odesláno: 9. Květen, 2015 (upraveno) Tak jsem to zase já Potřeboval bych pomoct s warpy.... #include <a_samp> public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/lv", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 1687.1189,1449.2395,10.7687); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/lv",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/dragon", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 2027.4263,1007.3815,10.8203); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/dragon",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/zbrojniprukaz", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 2156.3342,943.6905,10.8203); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/zbrojniprukaz",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/policiels", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 1553.3988,-1675.8413,16.1953); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/policiels",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/dealer", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, -1100.9844,-1637.2074,76.3672); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/dealer",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/tuningsf", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, -2707.3535,216.6838,4.1797); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/tuningsf",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/otto", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, -1639.4730,1203.6525,7.2307); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/otto",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/policielv", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 2288.4172,2429.3145,10.8203); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/policielv",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/area51", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 360.5692,2017.3335,22.6406); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/area51",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/policiesf", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, -1610.0269,718.7537,12.7896); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/policiesf",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/urad", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 2418.7710,1124.3230,10.8203); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/urad",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } if (strcmp("/warpy2", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 101, DIALOG_STYLE_MSGBOX, "{ff0000}Seznam warpů:","{00FF07}/lv /urad /policielv /otto /tuningsf /dealer /policiels /zbrojniprukaz /dragon","Zvolit","Zavřít"); return 1; } return 0; } Mám tam warpy, ale když napíšu třeba /urad a chci se tam portnout s autem tak mě to tam portne bez auta. A já nevím jak to udělat i s autem. Tak proto vás žádám o pomoc Díky předem Edited 9. Květen, 2015 by Petr2000 Link to comment Share on other sites More sharing options...
vladasavel 26 Odesláno: 9. Květen, 2015 Share Odesláno: 9. Květen, 2015 new veh= GetPlayerVehicleID(playerid); SetVehiclePos(veh,x,y,z); xyz dopln podle svých udajů Link to comment Share on other sites More sharing options...
Paulee 16 Odesláno: 9. Květen, 2015 Author Share Odesláno: 9. Květen, 2015 new veh= GetPlayerVehicleID(playerid); SetVehiclePos(veh,x,y,z); xyz dopln podle svých udajů Ok dík zkusím to dát na server Píše mi to warningy : C:\Documents and Settings\petr\Desktop\warpy.pwn(18) : warning 213: tag mismatch C:\Documents and Settings\petr\Desktop\warpy.pwn(18) : warning 202: number of arguments does not match definition C:\Documents and Settings\petr\Desktop\warpy.pwn(17) : warning 204: symbol is assigned a value that is never used: "veh" Link to comment Share on other sites More sharing options...
sampx 0 Odesláno: 9. Květen, 2015 Share Odesláno: 9. Květen, 2015 skus if (strcmp("/urad", cmdtext, true, 10) == 0) { if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),2418.7710,1124.3230,10.8203); SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/urad",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); } else { SetPlayerPos(playerid, 2418.7710,1124.3230,10.8203); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/urad",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); } return 1; } Link to comment Share on other sites More sharing options...
vladasavel 26 Odesláno: 9. Květen, 2015 Share Odesláno: 9. Květen, 2015 sampx to je zbytečně složitý..mě to takto funguje if (strcmp("/lv", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 1687.1189,1449.2395,10.7687); new string[140]; new vehicl=GetPlayerVehicleID(playerid); SetVehiclePos(vehicl,1687.1189,1449.2395,10.7687); new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/lv",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } Link to comment Share on other sites More sharing options...
Paulee 16 Odesláno: 9. Květen, 2015 Author Share Odesláno: 9. Květen, 2015 skus if (strcmp("/urad", cmdtext, true, 10) == 0) { if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),2418.7710,1124.3230,10.8203); SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/urad",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); } else { SetPlayerPos(playerid, 2418.7710,1124.3230,10.8203); new string[140]; new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/urad",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); } return 1; } J jde ti díky moc sampx to je zbytečně složitý.. mě to takto funguje if (strcmp("/lv", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 1687.1189,1449.2395,10.7687); new string[140]; new vehicl=GetPlayerVehicleID(playerid); SetVehiclePos(vehicl,1687.1189,1449.2395,10.7687); new nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); format(string,140,"Hráč {00FF07}%s(%d){FFFFFF} se odwarpoval na {ff0000}/lv",nick,playerid); SendClientMessageToAll(0xFF0000FF, string); return 1; } Tu mi tu píše warning: C:\Documents and Settings\petr\Desktop\warpy.pwn(17) : warning 217: loose indentation Link to comment Share on other sites More sharing options...
vladasavel 26 Odesláno: 9. Květen, 2015 Share Odesláno: 9. Květen, 2015 to znemená že to není odtabovaný ale jinak je to vše správně. Odtabuj si to a budeš mít po warningu Link to comment Share on other sites More sharing options...
Paulee 16 Odesláno: 9. Květen, 2015 Author Share Odesláno: 9. Květen, 2015 Už mi to jde taky dík vladasavel ten tvůj způsob mi nejde... Portnu se tam i stím vozidlem ale to vozidlo je podmenou a nesedím v něm pořád.... Takže použiji sice ten delší způsob ale funguje... Link to comment Share on other sites More sharing options...
Mikoo 8 Odesláno: 9. Květen, 2015 Share Odesláno: 9. Květen, 2015 Ide to aj lachsim spôsobom Link to comment Share on other sites More sharing options...
vladasavel 26 Odesláno: 9. Květen, 2015 Share Odesláno: 9. Květen, 2015 joo já zapomel ještě na PutPlayerInVehicle(playerid,vehicl,0); Link to comment Share on other sites More sharing options...
Paulee 16 Odesláno: 13. Květen, 2015 Author Share Odesláno: 13. Květen, 2015 To je už jedno Můžete lock Link to comment Share on other sites More sharing options...
The hidden face 77 Odesláno: 13. Květen, 2015 Share Odesláno: 13. Květen, 2015 Lock můžeš sám! Link to comment Share on other sites More sharing options...
Recommended Posts