26.12.2010, 23:36
Код:
if(strcmp(cmdtext, "/SeuTele", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) {// * new VehicleID; //* VehicleID = GetPlayerVehicleID(playerid); //* SetVehiclePos(VehicleID,-2351.763,-1644.297,483.363); // aqui й o local que ele vai ser teleportado junto ao veнculo new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "[TELE] O jogador %s foi para o Mont Chiliad( /montchiliad )", pname); // exemplo mont chiliad SendClientMessageToAll(COLOR_YELLOW, string); ResetPlayerWeapons(playerid); // reseta as armas SetPlayerInterior(playerid,0); } else{ new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "[TELE] O jogador %s foi para o Mont Chiliad( /montchiliad )", pname); // nгo retirar SendClientMessageToAll(COLOR_YELLOW, string); ResetPlayerWeapons(playerid); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,-2351.763,-1644.297,483.363);// aqui a mesma coordenada de onde irб ser teleportado } return 1; }