Pay at toll - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pay at toll (
/showthread.php?tid=354296)
Pay at toll -
livests - 26.06.2012
Hy i have problem with toll. Then im near it toll opens but don't need to pay. I try all tipes but nothing only with pickup all works great but its looks stupid and with bike can drive past without pay.
Script on pastebin
http://pastebin.com/kQM6eqst
Re: Pay at toll -
[MM]RoXoR[FS] - 26.06.2012
Try using
TogglePlayerControllable
Re: Pay at toll -
Dan_Barocu - 26.06.2012
PHP код:
GivePlayerCash(playerid, -7);
Does this work?
Re: Pay at toll -
livests - 26.06.2012
Quote:
Originally Posted by Dan_Barocu
PHP код:
GivePlayerCash(playerid, -7);
Does this work?
|
Undifined simbol
Re: Pay at toll -
livests - 26.06.2012
Ok i fix it
Quote:
forward Gates7Check(playerid);
public Gates7Check(playerid)
{
new gates7_status;
for(new all = 0;all<MAX_PLAYERS;all++)
{
if(!IsPlayerConnected(all)) continue;
if(IsPlayerInRangeOfPoint(all,10.0, -1674.90002441, 548.09997559, 38.90000153))gates7_status=1;
if(IsPlayerInRangeOfPoint(all,10.0, -1674.90002441, 548.09997559, 38.90000153))
{
GivePlayerMoney(all,-20);
SendClientMessage(all,0xFFFAAA,"You Have paid for toll.");
}
}
if(gates7_status)MoveObject(gates7, -1674.90002441, 548.09997559, 34.90000153, 0.5);
else MoveObject(gates7, -1674.90002441, 548.09997559, 38.90000153, 6.5);
return;
}
|
but there is new problem money stop take off only then i drive away but while i stand in range point i have 20 times -20 bucks
Re: Pay at toll -
Dan_Barocu - 26.06.2012
PHP код:
if(IsPlayerInRangeOfPoint(all,10.0, -1674.90002441, 548.09997559, 38.90000153) && if(IsPlayerInRangeOfPoint(all,10.0, -1674.90002441, 548.09997559, 38.90000153))
like this?
Re: Pay at toll -
MadeMan - 26.06.2012
pawn Код:
public Gates7Check(playerid)
{
new gates7_status;
for(new all = 0; all<MAX_PLAYERS; all++)
{
if(!IsPlayerConnected(all)) continue;
if(IsPlayerInRangeOfPoint(all,10.0, -1674.90002441, 548.09997559, 38.90000153))
{
gates7_status=1;
if(!GetPVarInt(all, "TollPaid"))
{
GivePlayerMoney(all,-20);
SendClientMessage(all,0xFFFAAA,"You Have paid for toll.");
SetPVarInt(all, "TollPaid", 1);
}
}
else
{
SetPVarInt(all, "TollPaid", 0);
}
}
if(gates7_status) MoveObject(gates7, -1674.90002441, 548.09997559, 34.90000153, 0.5);
else MoveObject(gates7, -1674.90002441, 548.09997559, 38.90000153, 6.5);
}
Re: Pay at toll -
livests - 26.06.2012
Quote:
Originally Posted by MadeMan
pawn Код:
public Gates7Check(playerid) { new gates7_status; for(new all = 0; all<MAX_PLAYERS; all++) { if(!IsPlayerConnected(all)) continue; if(IsPlayerInRangeOfPoint(all,10.0, -1674.90002441, 548.09997559, 38.90000153)) { gates7_status=1; if(!GetPVarInt(all, "TollPaid")) { GivePlayerMoney(all,-20); SendClientMessage(all,0xFFFAAA,"You Have paid for toll."); SetPVarInt(all, "TollPaid", 1); } } else { SetPVarInt(all, "TollPaid", 0); } } if(gates7_status) MoveObject(gates7, -1674.90002441, 548.09997559, 34.90000153, 0.5); else MoveObject(gates7, -1674.90002441, 548.09997559, 38.90000153, 6.5); }
|
same pay take so long i wait toll open