Help with Taxi System
#1

Hello,I have a scripting problem.
I want to make a taxi system.
But it won't work,please can someone help me to fix this?
I want to make a Taxi System, that if you enter the taxi as a passenger,the timer will start and you will lose money
Here is the code:
Код:
#include <a_samp>

new taxi = 1;
new timer = 0;
new timer1;

#define COLOR_GREEN 0x00A800AA

forward money(playerid);

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  if(GetVehicleModel(vehicleid) == 420)
  {
    if (GetPlayerState(ispassenger) == 3)
    {
      timer1 = SetTimer("money",1000,true);
      timer = 1;
		}
    //SendClientMessage(playerid,COLOR_GREEN,"There is no Driver in this taxi.");
		//taxi = 1;
		//SendClientMessage(playerid,COLOR_GREEN,"You can now pickup people.");
	}
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	if (timer == 1)
	{
    timer = 0;
    KillTimer(timer1);
	}
}

public money(playerid)
{
  GivePlayerMoney(playerid,-1);
  SendClientMessage(playerid,COLOR_GREEN,"You paid $1.");
}

Reply


Messages In This Thread
Help with Taxi System - by Rensieboy14 - 11.01.2010, 17:15
Re: Help with Taxi System - by Perker12345 - 11.01.2010, 17:24
Re: Help with Taxi System - by RyDeR` - 11.01.2010, 17:39
Re: Help with Taxi System - by Rensieboy14 - 11.01.2010, 17:57
Re: Help with Taxi System - by Perker12345 - 11.01.2010, 18:08
Re: Help with Taxi System - by Rensieboy14 - 11.01.2010, 18:11
Re: Help with Taxi System - by Rensieboy14 - 11.01.2010, 19:42
Re: Help with Taxi System - by Calgon - 11.01.2010, 19:44
Re: Help with Taxi System - by Rensieboy14 - 11.01.2010, 19:47
Re: Help with Taxi System - by Calgon - 11.01.2010, 19:49

Forum Jump:


Users browsing this thread: 1 Guest(s)