Toll Booth
#1

Hi All i have some problems with my toll booth

[YES I SEARCHED THE FORUMS ]
It compiles fine but if i go in my server i go to the pickup to pay 100 the barrier wont go open, this is the script:

Код:
new BoothNDirNGate;
new BoothNDirSGate;
new BoothSDirSGate;
new BoothSDirNGate;
new BoothNDirNPickup;
new BoothNDirSPickup;
new BoothSDirSPickup;
new BoothSDirNPickup;


forward BoothNDirNGateClose();
forward BoothNDirSGateClose();
forward BoothSDirSGateClose();
forward BoothSDirNGateClose();

	//Objects
	CreateObject(9623, 1793.594360, 687.474426, 17.282511, 0.0000, 0.0000, 351.3283);
	CreateObject(9623, 1775.710815, 690.203857, 17.281092, 0.0000, 0.0000, 351.3283);
	CreateObject(966, 1782.730225, 685.345886, 15.285233, 0.0000, 0.0000, 348.7500);
	CreateObject(966, 1773.754150, 686.950195, 15.282106, 0.0000, 0.0000, 348.7500);
	CreateObject(968, 1773.841919, 686.946228, 16.216358, 0.0000, 268.0403, 348.7500);
	CreateObject(968, 1782.843140, 685.346069, 16.133198, 0.0000, 268.0403, 348.7500);
	CreateObject(966, 1793.972412, 697.319824, 14.370026, 0.0000, 0.0000, 348.7500);
	CreateObject(966, 1802.745972, 695.731323, 14.365092, 0.0000, 0.0000, 348.7500);
	CreateObject(968, 1802.875244, 695.741699, 15.224345, 0.0000, 268.0403, 348.7499);
	CreateObject(968, 1794.030762, 697.280396, 15.261672, 0.0000, 268.0403, 348.7499);
	
	//Pickups
	BoothNDirNPickup = CreatePickup(1274,14,1779.7521,689.9738,16.0389);
	BoothNDirSPickup = CreatePickup(1274,14,1771.5936,693.0703,15.9372);
	BoothSDirSPickup = CreatePickup(1274,14,1788.7377,688.6647,16.0134);
	BoothSDirNPickup = CreatePickup(1274,14,1797.8378,688.8030,15.9129);

public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == BoothNDirNPickup)
	{
	  if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
	  else
	  {
	    SetObjectRot(BoothNDirNGate,0.0,0.0,0.0);
	    SetTimer("BoothNDirNGateClose",7000,0);
		}
	}
	else if(pickupid == BoothNDirSPickup)
	{
	  if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
	  else
	  {
	    GivePlayerMoney(playerid,-100);
	    GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
	    SetObjectRot(BoothNDirSGate,0.0,-1.719,180.000);
	    SetTimer("BoothNDirSGateClose",7000,0);
		}
	}
	else if(pickupid == BoothSDirSPickup)
	{
	  if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
	  else
	  {
	    SetObjectRot(BoothSDirSGate,0.0,-2.578,0.0);
	    SetTimer("BoothSDirSGateClose",7000,0);
		}
	}
	else if(pickupid == BoothSDirNPickup)
	{
	  if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
	  else
	  {
	    GivePlayerMoney(playerid,-100);
	    GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
	    SetObjectRot(BoothSDirNGate,0.0,-1.719,-180.000);
	    SetTimer("BoothSDirNGateClose",7000,0);
   	}
	}
	return 1;
}

public BoothNDirNGateClose()	SetObjectRot(BoothNDirNGate,0.0,-91.100,0.0);
public BoothNDirSGateClose()	SetObjectRot(BoothNDirSGate,0.0,-91.100,180.000);
public BoothSDirSGateClose()	SetObjectRot(BoothSDirSGate,0.0,-91.100,0.0);
public BoothSDirNGateClose()	SetObjectRot(BoothSDirNGate,0.0,-91.100,-180.000);
yes there is more but that is of a GM

so anyone do know why it wont open??


TY ALOT
Luckie12
Reply
#2

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == BoothNDirNPickup)
    {
      if(GetPlayerMoney(playerid) < 100) return GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
}
      else
      {
        SetObjectRot(BoothNDirNGate,0.0,0.0,0.0);
        SetTimer("BoothNDirNGateClose",7000,0);
        }
    }
 if(pickupid == BoothNDirSPickup)
    {
      if(GetPlayerMoney(playerid) < 100) return GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
}
      else
      {
        GivePlayerMoney(playerid,-100);
        GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
        SetObjectRot(BoothNDirSGate,0.0,-1.719,180.000);
        SetTimer("BoothNDirSGateClose",7000,0);
        }
    }
    if(pickupid == BoothSDirSPickup)
    {
      if(GetPlayerMoney(playerid) < 100) return GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
}
      else
      {
        SetObjectRot(BoothSDirSGate,0.0,-2.578,0.0);
        SetTimer("BoothSDirSGateClose",7000,0);
        }
    }
    if(pickupid == BoothSDirNPickup)
    {
      if(GetPlayerMoney(playerid) < 100) return GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
}
      else
      {
        GivePlayerMoney(playerid,-100);
        GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
        SetObjectRot(BoothSDirNGate,0.0,-1.719,-180.000);
        SetTimer("BoothSDirNGateClose",7000,0);
    }
    }
    return 1;
}
Reply
#3

Код:
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(966) : warning 209: function "OnPlayerPickUpPickup" should return a value
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(967) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(969) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(971) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(981) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(983) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(989) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(991) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(993) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(1001) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(881) : warning 204: symbol is assigned a value that is never used: "BoothNDirSPickup"
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(883) : warning 204: symbol is assigned a value that is never used: "BoothSDirNPickup"
C:\Documents and Settings\Luc\Bureaublad\pwn\gamemodes\lvdm.pwn(882) : warning 204: symbol is assigned a value that is never used: "BoothSDirSPickup"
Reply
#4

Some one?

Sorry For bump
Reply
#5

some one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)