[SOLVED] Admin Vehicle Script
#1

Hi guys! Its me again with another noobish question! lol


Please reply to this!
I have made a tuned command script for admins! what it does is IT Makes the vehicle an admin vehicle so no-one else can get in! But i dont know how to the vehicle health to infinite.

Here is the script:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  printf("ID %d was at %d and changed to state %d",playerid,oldstate,newstate);
  new currentState = GetPlayerState(playerid);
  if (currentState == PLAYER_STATE_DRIVER)
	{
		//It's a driveby, take some money
    if(IsPlayerInVehicle(playerid, tuned))
		{
 			if(IsPlayerLAdmin(playerid))
			{
				SendClientMessage(playerid, 0xFFFF00FF,"Welcome to your admin car");
                          new vehicleid = GetPlayerVehicleID(playerid);
				SetVehicleHealth(vehicleid,999999999.0);
			}
			else
			RemovePlayerFromVehicle(playerid);
		}
	}
	return 1;
}
It gives me no errors when i compile but in the script, the set vehicle health doesn't work, so the vehicle does blow up!
Please can u explain what I should do!

By the way, im rubbish at scripting as u might know from my recent posts so i would prefer it if u explained it detail
Thank you guys!
Reply


Messages In This Thread
[SOLVED] Admin Vehicle Script - by Tigerbeast11 - 16.09.2009, 17:32
Re: Admin Vehicle Script - by Chaprnks - 16.09.2009, 21:49
Re: Admin Vehicle Script - by Tigerbeast11 - 17.09.2009, 17:19
Re: Admin Vehicle Script - by Paladin - 17.09.2009, 19:35
Re: Admin Vehicle Script - by Tigerbeast11 - 18.09.2009, 19:12
Re: [SOLVED] Admin Vehicle Script - by hu11 - 07.10.2009, 19:46
Re: [SOLVED] Admin Vehicle Script - by dcgm19 - 21.10.2009, 23:52
Re: [SOLVED] Admin Vehicle Script - by CAR - 22.10.2009, 08:58
Re: [SOLVED] Admin Vehicle Script - by Abernethy - 22.10.2009, 08:59
Re: [SOLVED] Admin Vehicle Script - by CAR - 22.10.2009, 09:09

Forum Jump:


Users browsing this thread: 1 Guest(s)