Seatbelt & player hit
#5

Код:
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;
	}
This is for seatbelt.
But how can i disable when player inside the car and if he hits something his hp getting lower
Reply


Messages In This Thread
Seatbelt & player hit - by PaulDinam - 24.06.2012, 06:45
Re: Seatbelt & player hit - by PaulDinam - 24.06.2012, 06:53
Re: Seatbelt & player hit - by JaKe Elite - 24.06.2012, 06:54
Re: Seatbelt & player hit - by [KHK]Khalid - 24.06.2012, 07:00
Re: Seatbelt & player hit - by PaulDinam - 24.06.2012, 07:14
Re: Seatbelt & player hit - by Face9000 - 24.06.2012, 08:13
Re: Seatbelt & player hit - by Rob_Maate - 24.06.2012, 08:52

Forum Jump:


Users browsing this thread: 1 Guest(s)