24.06.2012, 07:14
Код:
if(strcmp(cmd,"/seatbelt",true)==0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { new carid = GetPlayerVehicleID(playerid); if(IsABike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || pveh == 523 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457) return SendClientMessage(playerid, COLOR_GREY, " There is no seatbelt in this vehicle!"); if(SeatBelt[playerid]==false) { format(string, sizeof(string), "* %s buckles his/her seat belt", sendername); ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SeatBelt[playerid]=true; AffectVehicleDamageToPlayer(playerid,idcar,0); } else if(SeatBelt[playerid]==true) { SeatBelt[playerid]=false; AffectVehicleDamageToPlayer(playerid,idcar,1); format(string, sizeof(string), "* %s unbuckles his/her seat belt", sendername); ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } } else return SendClientMessage(playerid, COLOR_GREY, " You are not in a vehicle!"); } return 1; }
But how can i disable when player inside the car and if he hits something his hp getting lower