undefined symbol "playerid".
#4

pawn Код:
forward GetVehicleSpeed(vehicleid, unit);
forward test(playerid);
/*=========================Callbacks=========================*/

public GetVehicleSpeed(vehicleid, unit)
{
        new
                Float:x_speed, Float:y_speed, Float:z_speed, Float:speedf, speed;


        GetVehicleVelocity(vehicleid,x_speed,y_speed,z_speed);
        if(unit == kmh)
        {
                speedf = floatsqroot(((x_speed*x_speed)+(y_speed*y_speed))+(z_speed*z_speed)) * 187.666667;
        }
        else if(unit == mph)
        {
                speedf = floatsqroot(((x_speed*x_speed)+(y_speed*y_speed))+(z_speed*z_speed)) * 116.541;
        }
        speed = floatround(speedf,floatround_round);
        return speed;
}

public OnPlayerConnect(playerid)
{
    SetTimerEx("test", 360000, true, "i", playerid);
    return 1;
}
public test(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid,30.0,-2802.2390,-474.2502,7.1875))
    {
        new v = GetPlayerVehicleID(playerid);
        GetVehicleSpeed(v,kmh);
        if(GetVehicleSpeed(GetPlayerVehicleID(playerid) > 50))
        {
            SendClientMessage(playerid,-1,"Speed kam kar oye!");
            GivePlayerMoney(playerid,-100);
        }
    }
}

Try This.
Reply


Messages In This Thread
undefined symbol "playerid". - by TaLhA XIV - 23.08.2012, 19:58
Re: undefined symbol "playerid". - by Sielly - 23.08.2012, 20:00
Re: undefined symbol "playerid". - by TaLhA XIV - 23.08.2012, 20:42
Re: undefined symbol "playerid". - by .FuneraL. - 23.08.2012, 20:43
Re: undefined symbol "playerid". - by TaLhA XIV - 23.08.2012, 20:46
Re: undefined symbol "playerid". - by .FuneraL. - 23.08.2012, 20:49
Re: undefined symbol "playerid". - by clarencecuzz - 23.08.2012, 20:50
Re: undefined symbol "playerid". - by TaLhA XIV - 24.08.2012, 00:18
Re: undefined symbol "playerid". - by Kirollos - 24.08.2012, 00:48

Forum Jump:


Users browsing this thread: 2 Guest(s)