09.01.2015, 17:22
Код:
public OnPlayerUpdate(playerid) { if(!IsPlayerConnected(playerid)) return 0; if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { for(new i = 1; i < sizeof(SpikeInfo); i++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][sgX], SpikeInfo[i][sgY], SpikeInfo[i][sgZ])) { if(SpikeInfo[i][sgCreated] == 1) { new panels, tires; new carid = GetPlayerVehicleID(playerid); GetVehicleDamageStatus(carid, panels, doors, lights, tires); tires = encode_tires(1, 1, 1, 1); UpdateVehicleDamageStatus(carid, panels, doors, lights, tires); return 0; } } } } return 1; }