22.04.2016, 07:07
Код:
cmd:beginevent(playerid, params[]) { new rand = Random(1, 99); if(EventCars[rand] == INVALID_VEHICLE_ID) { new Float:x, Float:y, Float:z; new Float:Angle; GetPlayerFacingAngle(i, Angle); GetPlayerPos(i, x, y, z); EventCars[rand] = CreateVehicle(Events[EventCar], x,y,z+2,Angle,-1,-1,VEHICLE_RESPAWN); VehicleFuel[EventCars[rand]] = 100.0; Vehicle_ResetData(EventCars[rand]); PutPlayerInVehicle(i, EventCars[rand], 0); SetPlayerHealth(i, Events[Health]); SetPlayerArmor(i, Events[Armor]); CarShooting[i] = 1; } } new EventCars[100] = INVALID_VEHICLE_ID;