Command. Distance showing.
#2

HTML Code:
if(strcmp(cmdtext, "/distance", true) == 0)
    {
       new Float:X,Float:Y,Float:Z;
    GetObjectPos(CrateObject , X,Y,Z);
        new
        Float: fDistance = GetPlayerDistanceFromPoint(playerid, X,Y,Z),
        szMessage[44];
 
        format(szMessage, sizeof(szMessage), "You're %0.2f meters away from the vending machine.", fDistance);
        SendClientMessage(playerid, 0xA9C4E4FF, szMessage);
 
        return 1;
    }
Reply


Messages In This Thread
Command. Distance showing. - by ,TomY' - 18.07.2016, 19:23
Re: Command. Distance showing. - by Mister0 - 18.07.2016, 20:29

Forum Jump:


Users browsing this thread: 1 Guest(s)