21.02.2013, 10:24
pawn Код:
else if(newstate == PLAYER_STATE_ENTER_VEHICLE_PASSENGER) // Player entered a vehicle as a driver
{
new string[150], str[150], PlayerN[MAX_PLAYER_NAME], Player1[MAX_PLAYER_NAME];
new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
new car = modelid-400;
format(string, sizeof(string), "~w~%s", VehicleNames[car]);
GameTextForPlayer(playerid,string,3000,1);
new driver=GetVehicleDriver(modelid);
GetPlayerName(driver, PlayerN, sizeof(PlayerN));
GetPlayerName(playerid, Player1, sizeof(Player1));
if(IsPlayerNPC(driver))
{
format(str, sizeof str, "%s: {FFFFF}I am not gonna drive you for free, %s. It will cost $10/10 minutes", PlayerN, Player1);
SendClientMessage(playerid, GetPlayerColor(driver), str);
drivertimer[playerid] = SetTimerEx("DriverCosts",5000,true,"i",playerid);
}
}
Using: https://sampforum.blast.hk/showthread.php?tid=271321