Float goto
#1

I made a float goto so i selected

Float X: 316.524993
Float Y:-167.706985
Float Z: 999.593750
Interior: 6

I attempted to teleport to ammunation 5 from this link

http://weedarr.wikidot.com/interior

Well when i teleport, next thing i know i get the screen crash where my screen slowly goes white and says You cannot go pass the boundary or w/e
pawn Код:
CMD:fgoto(playerid,params[])
{
    if(PlayerData[playerid][AdminLevel] < 4) return 0;
    new pickx,picky,pickz,pickint;
    if(sscanf(params,"fffi",pickx,picky,pickz,pickint))return SCM(playerid,grey,"USAGE: /fgoto [X] [Y] [Z] [Interior]");
    format(str,sizeof(str),"You have teleported (X: %f,Y: %f,Z: %f,Interior: %d",pickx,picky,pickz,pickint);
    SCM(playerid,COLOR_LIMEGREEN,str);
    SetPlayerInterior(playerid,pickint);
    SetPlayerPos(playerid,pickx,picky,pickz);
    return 1;
}
Whatever i typed on /fgoto shows correct in the sentences
"You have teleported...."
then my screen goes white slowly, how can i fix this
Reply
#2

Do you have world boundaries in your script?
Reply
#3

Invalid Co-ordinate, simple reaction.
Reply
#4

Why no "Float:" tags?

pawn Код:
new Float:pickx, Float:picky, Float:pickz, pickint;
An edit:
pawn Код:
CMD:fgoto(playerid, params[])
{
    if(PlayerData[playerid][AdminLevel] < 4) return false;
   
    new
        Float:TargetX,
        Float:TargetY,
        Float:TargetZ,
        TargetInterior
    ;
   
    if(sscanf(params, "fffi", TargetX, TargetY, TargetZ, TargetInterior))
    return SendClientMessage(playerid, grey, "USAGE: /fgoto [X] [Y] [Z] [Interior]");
   
    format(str,sizeof(str), "You have teleported (X: %f,Y: %f, Z: %f, Interior: %d",
    TargetX, TargetY, TargetZ, TargetInterior);
    SendClientMessage(playerid, COLOR_LIMEGREEN, str);
   
    SetPlayerInterior(playerid, TargetInterior);
    SetPlayerPos(playerid, TargetX, TargetY, TargetZ);
   
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)