SetPlayerPos[REP++]
#1

Hello guys i have a simple question
First here is the code
PHP код:
forward Unjail(playerid);
public 
Unjail(playerid)
{
    
SetPlayerPos(playerid257.2509,83.6424,1002.4453);
    
SetPlayerInterior(playerid0);
    
inJail[playerid] = false;
    
KillTimer(JailTimer[playerid]);
    
GameTextForPlayer(playerid"~g~Unjailed"50006);
    
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
    
SendClientMessage(playeridCOLOR_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 !!
Reply
#2

You mean JailTimer[playerid]? This timer calls Unjail(playerid)?
Reply
#3

This timer work when the player finish his jail time it works but the problem is with SetPlayerPos
Reply
#4

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.
Reply
#5

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;
}
Reply
#6

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.
Reply
#7

If you can't find the appropriate Z coordinate, use SetPlayerPosFindZ instead.
Reply
#8

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.
Reply
#9

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 !
Reply
#10

Solved Thanks for AtGoggy i didn't see your comment at the first by the way do you know me AtGoggy ??
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)