21.03.2014, 03:09
Removeplayerfromvehicle is not working. here is my code:
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new name[128]; GetPlayerName(playerid, name, sizeof(name)); for(new idx=1; idx<MAX_CAR; idx++) { if(vehicleid == CarInfo[idx][cVID] && CarInfo[idx][cStatus] == 1) { if(strcmp(CarInfo[idx][cOwner], name, false) != 0) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "YOU DO NOT OWN THIS CAR"); } } else { if(CarInfo[idx][cStatus] == 2) { SendClientMessage(playerid, COLOR_RED, "THIS CAR IS FOR SALE"); RemovePlayerFromVehicle(playerid); } } } return 1; }