Error compiling
#1

Hi guys, I have errors when compiling.

Already try to define each one and still persists.

I hope you help me, thank you very much.



Reply
#2

You need to tell the machine what SCM is, it's not defined.

pawn Код:
#define SCM SendClientMessage
This does the job.

Same for IsAPlane, the stock does not exist.

pawn Код:
stock IsAPlane(vehicleid)
{
    switch(GetVehicleModel(vehicleid))
    {
        case 460,464,476,511,512,513,519,520,553,577,592,593: return 1;
    }
    return 0;
}
Reply
#3

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
You need to tell the machine what SCM is, it's not defined.

pawn Код:
#define SCM SendClientMessage
This does the job.

Same for IsAPlane, the stock does not exist.

pawn Код:
stock IsAPlane(vehicleid)
{
    switch(GetVehicleModel(vehicleid))
    {
        case 460,464,476,511,512,513,519,520,553,577,592,593: return 1;
    }
    return 0;
}

Thanks, I work.

But now as I define a key to turn on the vehicle.

In the "public OnPlayerStateChange" the code is this.




Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        SCM(playerid,0x26931cFF,"{ffffff}Velocimetro -{1E90FF} \"LSTRL\" {ffffff}PS {1E90FF}((/en))");
        if(car_lock_z [ vehicleid ] == 1 ) RemovePlayerFromVehicle ( playerid );
        if(!IsAPlane ( vehicleid ) && !IsABoat ( vehicleid) && !IsANoSpeed ( vehicleid ) )
        {
            if(CarSaleOn[playerid] == 0)
            {
                SpeedTimer[playerid] = SetTimerEx("@__updeit_speed",100,1,"d",playerid);
                for ( new i ; i < 20 ; i++ ) PlayerTextDrawShow(
                                                        playerid , vehicle_speed [ playerid ] [ i ] ) ;
            }
        }
    }
    else if(newstate == PLAYER_STATE_ONFOOT)
    {
        KillTimer(SpeedTimer[playerid]);
        for ( new i ; i < 20 ; i++ ) PlayerTextDrawHide(
                                                        playerid , vehicle_speed [ playerid ] [ i ] ) ;
    }
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)