Setting OBject Rotation
#5

You need to use sscanf to split the three values up, or ask them to enter X then Y then Z on three separate dialogs.

pawn Код:
if(dialogid == SAMMOVE && response)
{
    new Float:x, Float:y, Float:z;
    if(sscanf(inputtext, "fff", x, y, z))
    {
        // Error with input - check for commas instead
        if(sscanf(inputtext, "p<,>fff", x, y, z))
        {
            // Coordinates failed - re-show dialog with a message or something
        }
    }
    SetObjectRot(sam, x, y, z);
}
With that they will have to enter something like '133.7 69.0 123.45' in the dialog, or with commas.
Reply


Messages In This Thread
Setting OBject Rotation - by Aira - 27.05.2012, 05:37
Re: Setting OBject Rotation - by ViniBorn - 27.05.2012, 05:50
Re: Setting OBject Rotation - by Aira - 27.05.2012, 05:51
Re: Setting OBject Rotation - by Aira - 27.05.2012, 06:54
Re: Setting OBject Rotation - by MP2 - 27.05.2012, 08:25
Re: Setting OBject Rotation - by Aira - 27.05.2012, 08:41

Forum Jump:


Users browsing this thread: 1 Guest(s)