23.12.2010, 11:57
guys i wanna to do some like when someone enter in a sales vehicle to get him in that car and freeze him i try this and i dont know how to do
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new string[128]; new vehicle[24]; GetVehicleName(vehicleid, vehicle, sizeof(vehicle)); for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(Spectate[i] != 255) { PlayerSpectateVehicle(i,vehicleid); } } } if(IsAnOwnableCar(vehicleid)) { format(string,sizeof(string),"You are entering to a %s (%d) Owner: %s",vehicle, vehicleid, CarInfo[vehicleid][cOwner]); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } else if(IsASalesVehicle(vehicleid)) { format(string,sizeof(string),"You are entering to a %s (%d) Owner: Dealership",vehicle, vehicleid); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); TogglePlayerControllable(playerid, 0); PutPlayerInVehicle(playerid, 0);