[QUESTION] Is Vehicle Sport Car
#1

Why dosent this work?

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsVehicleSportCar(playerid))
    {
        SendClientMessage(playerid,0x007F0EFF,"You entered a sport car.");
    }
    return 1;
}
pawn Код:
stock IsVehicleSportCar(playerid)
{
    new vehicleid;
    vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 411 || 541 || 451) return 0;
    return 0;
}
Reply
#2

Here you go

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsVehicleSportCar(vehicleid))
    {
        SendClientMessage(playerid,0x007F0EFF,"You entered a sport car.");
    }
    return 1;
}

IsVehicleSportCar(vehicleid)
{
    switch(GetVehicleModel(vehicleid))
    {
        case 441,541,541: { return 1; }
    }
    return 0;
}
Reply
#3

error 040: duplicate "case" label (value 541)

:S
Reply
#4

just change IDs to your vehicle models
Reply
#5

Quote:
Originally Posted by Voldemort
Посмотреть сообщение
just change IDs to your vehicle models
Oh, LoL, Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)