/lastdriver help
#9

Something like:

pawn Код:
new lastDriver[MAX_VEHICLES] = {INVALID_PLAYER_ID,..};

if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
    lastDriver[vehicleid] = playerid;
}

// onVehicleDeath
lastDriver[vehicleid] = INVALID_PLAYER_ID;

command(lastdriver, playerid, params[])
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new name[24], string[500]; GetPlayerName(lastDriver[GetPlayerVehicleID(playerid)],name,sizeof(name));
        format(string, sizeof(string), "The last driver of this %s was {FF0000}%s{FFFFFF}", GetVehicleName(GetPlayerVehicleID(playerid)), (isnull(name) ? "Unknown" : name));
        SendClientMessage(playerid, WHITE, string);
    }
    else return SCM(playerid, WHITE, "You are not in a vehicle.");
    return 1;
}
Reply


Messages In This Thread
/lastdriver help - by Mitchy - 20.12.2013, 13:33
Re: /lastdriver help - by ikey07 - 20.12.2013, 13:39
Re: /lastdriver help - by Mitchy - 20.12.2013, 13:47
Re: /lastdriver help - by Mitchy - 20.12.2013, 13:52
Re: /lastdriver help - by ikey07 - 20.12.2013, 14:08
Re: /lastdriver help - by cessil - 20.12.2013, 14:09
Re: /lastdriver help - by Mitchy - 20.12.2013, 14:18
Re: /lastdriver help - by tyler12 - 20.12.2013, 14:57
Re: /lastdriver help - by tyler12 - 20.12.2013, 15:20
Re: /lastdriver help - by DemME - 20.12.2013, 20:03

Forum Jump:


Users browsing this thread: 1 Guest(s)