Fix Command.
#2

Код:
CMD:fix(playerid, params[])
{
        new vehicleid = GetPlayerVehicleID(playerid);
	new
	aName[MAX_PLAYER_NAME],
	    taName[MAX_PLAYER_NAME],
		vehicleid,
		targetid
	;
 	vehicleid = GetClosestVehicle(playerid);
 	GetPlayerName(playerid, aName, sizeof(aName));
  	GetPlayerName(targetid, taName, sizeof(taName));
	if(gTeam[playerid] == ASSISTANCE)
 	{
	    if (IsPlayerInVehicle(targetid, vehicleid))
			{
        	 SetVehicleHealth(vehicleid, 1000.0);
			SendClientMessage(playerid, COLOR_WHITE, "You have Succesfully repaired the Vehicle.");
   			
     		return 1;
        	}
      	else return SendClientMessage(playerid, RED, "ERROR: You are not near a vehicle!");

	}
	return 1;
}
++REP!!!
Reply


Messages In This Thread
Fix Command. - by guitarmandanny - 28.10.2012, 21:23
Re: Fix Command. - by SwisherSweet - 28.10.2012, 21:38
Re: Fix Command. - by Eric - 28.10.2012, 21:38
Re: Fix Command. - by guitarmandanny - 28.10.2012, 21:41

Forum Jump:


Users browsing this thread: 1 Guest(s)