SetPlayerPos[REP++] -
nezo2001 - 31.12.2014
Hello guys i have a simple question
First here is the code
PHP код:
forward Unjail(playerid);
public Unjail(playerid)
{
SetPlayerPos(playerid, 257.2509,83.6424,1002.4453);
SetPlayerInterior(playerid, 0);
inJail[playerid] = false;
KillTimer(JailTimer[playerid]);
GameTextForPlayer(playerid, "~g~Unjailed", 5000, 6);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
SendClientMessage(playerid, COLOR_GREEN, "You are free now but we took from you a small thing so you have to not make it again !");
GivePlayerMoney(playerid, -500);
}
It works and when the timer end it unjail him but put him in the sky not at the place that i have put its cordinate ?
Please Help !!
Re: SetPlayerPos[REP++] -
Anuris - 31.12.2014
You mean JailTimer[playerid]? This timer calls Unjail(playerid)?
Re: SetPlayerPos[REP++] -
nezo2001 - 31.12.2014
This timer work when the player finish his jail time it works but the problem is with SetPlayerPos
Re: SetPlayerPos[REP++] -
Anuris - 31.12.2014
pawn Код:
SetPlayerPos(playerid, 257.2509,83.6424,4.0);
Your Z coordinate was 1002.4453 (it's really high), I've changed it to 4.
Re: SetPlayerPos[REP++] -
Abagail - 31.12.2014
Verify your coordinates are correct. Try something such as this:
pawn Код:
CMD:test(playerid, params[])
{
SetPlayerPos(playerid, 257.2509,83.6424,1002.4453);
SetPlayerInterior(playerid, 0);
return 1;
}
Re: SetPlayerPos[REP++] -
CalvinC - 31.12.2014
SetPlayerPos(playerid, 257.2509,83.6424,1002.4453);
The last digits are the height you spawn him at, Z-coordinates.
It's set to 1000, which will spawn him way up into the sky.
Lower it if you want him to spawn on the ground.
Re: SetPlayerPos[REP++] -
Lordzy - 31.12.2014
If you can't find the appropriate Z coordinate, use SetPlayerPosFindZ instead.
Re: SetPlayerPos[REP++] -
ATGOggy - 31.12.2014
This position you're setting is an interior.
If you want the player to be in an interior, remove that SetPlayerInterior line or you'll fall from a place near Blueberry.
Re: SetPlayerPos[REP++] -
nezo2001 - 31.12.2014
Ok now i tried all things and tried the test command now add SetPlayerPosFindZ it spawn me on the ground but
The saved cordinateas should spawn me here
But is spawn me here
Please help !
Re: SetPlayerPos[REP++] -
nezo2001 - 31.12.2014
Solved Thanks for AtGoggy i didn't see your comment at the first by the way do you know me AtGoggy ??