odd function behavor
#5

I had a similar problem like this once too.

Try this
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
    {
        if(!IsVehicleOwner(plyerid, vehicleid) && AwesomeVehicleID(vehicleid) != 0)
        {
            SendClientMessage(playerid, 0xFF0000FF, "this is not your vehicle");
            print("not yours");
            //eject
        }
        printf("Name lenght: %i | Awesome ID: %i | Owner: %s", strlen(GetVehicleOwner(vehicleid)), AwesomeVehicleID(vehicleid), GetVehicleOwner(vehicleid));
    }
    return 1;
}

stock IsVehicleOwner(playerid, vehicleid)
{
    if(strmatch(PlayerName(playerid), VehicleData[awesomeid][VehicleOwner])) return true:
    return false;
}
Reply


Messages In This Thread
odd function behavor - by Unknown123 - 26.12.2011, 16:34
Re: odd function behavor - by FireCat - 26.12.2011, 16:39
Re: odd function behavor - by [MG]Dimi - 26.12.2011, 16:39
Re: odd function behavor - by Unknown123 - 26.12.2011, 16:43
Re: odd function behavor - by Laronic - 26.12.2011, 16:56

Forum Jump:


Users browsing this thread: 1 Guest(s)