Function problem
#4

The GetPlayerDistanceToPoint function should work, it is this:

pawn Код:
CMD:getdistance(playerid, params[])
{
    new id, string[230];
    new Float:x,Float:y,Float:z;
    if(sscanf(params, "u", id)) return Msg(playerid, color, ""#red"USAGE: "#green"/getdistance <playerid>");
    if(!Connect(playerid)) return Msg(playerid, color, NOT_CONNECTED);
    GetPlayerPos(id, x, y, z);    // This was missing
    format(string,sizeof(string),""#red"Distance to "#green"%s (id: %d): "#blue"%d",GetMyName(id),id,GetPlayerDistanceToPoint(playerid,x,y,z));
    Msg(playerid, color, string);
    return 1;
}
Reply


Messages In This Thread
Function problem [Resolved] - by blackwave - 18.04.2011, 13:04
Re: Function problem - by Mauzen - 18.04.2011, 13:27
Re: Function problem - by blackwave - 18.04.2011, 13:41
Re: Function problem - by Mauzen - 18.04.2011, 13:51
Re: Function problem - by blackwave - 18.04.2011, 14:00

Forum Jump:


Users browsing this thread: 2 Guest(s)