SA-MP Forums Archive
help /toll cmd - 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: help /toll cmd (/showthread.php?tid=350626)



help /toll cmd - Dw.UsHer - 13.06.2012

hello !

how to make command toll when a player will write / toll to open the toll gates? please help me i need it ... And when you write / toll to take $ 100 and written up in the chat Mike_Soprano out of pocket money and pay the toll ..
then for 5 seconds to close the gate automatically ..

i have a this cmd but i have a problem

Код:
if (strcmp("/toll", cmdtext, true, 10) == 0)
{
if(PlayerToPoint(15.0, playerid,1636.5308,-32.0325,36.6181))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "tolls have paid $ -50");");
MoveObject(lvputarina1,1637.69995117,-32.2,31,50);
SetTimer("GateClose11",100,100);
GivePlayerMoney(playerid,-50);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s ", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 1;
}
if(PlayerToPoint(15.0, playerid,1642.2356,-16.4204,36.6030))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "tolls have paid $ -50");
MoveObject(lvputarina2,1640.40002441,-14.30000019,31,50);
SetTimer("GateClose12",100,100);
GivePlayerMoney(playerid,-50);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes money from his pocket and pays the toll.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 1;
}
return 1;
}
now, the problem is does not want to shut down automatically and one toll is open / closes and does not want another example when going from LS to SF it first opens but when I go from SF to the LS does not want to open the other ..

pleaseee help me to do this..