I've got an controller code that says:
$player->town_id = $input['town'];
// this is located mostly in the config.lua
$player->posx = '95'; // posx (X)
$player->posy = '117'; // posy (Y)
$player->posz = '7'; // posz (Z)
also here's the view (part of view that you need):
<div class="control-group">
{{ Form::label('town', 'Town:') }}
<div class="controls">
{{ Form::select('town', array('1' => 'Main Town', '2' => 'Second Town'), '1'); }}
</div>
</div>
You see, what I want is to set a config or something like an if statement. If the town is set to Main Town (which is equals to 1) then it will be like this:
$player->posx = '95'; // posx (X)
$player->posy = '117'; // posy (Y)
$player->posz = '7'; // posz (Z)
else if the user selects Second Town (which is equals to 2), it'll use a different postion:
$player->posx = '1000'; // posx (X)
$player->posy = '1000'; // posy (Y)
$player->posz = '7'; // posz (Z)
Is there an if statement or something that I could use in this case?