18.07.2010, 22:14
Who can explain me how I put in a script?
A car that only has to pay the toll before he could drive!
A car that only has to pay the toll before he could drive!
if(GetVehicleModel(vehicleid) == 601) // change the ID to the car model
{
if(ispassenger == 0)
{
ShowPlayerDialog(playerid,DIALOG_STYLE_MSGBOX,1,"Car","You need to pay 20$ to drive","Pay","Cancel");
}
}
if(dialogid == 1)
{
if(!response)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_RED,"You left the car");
}
GivePlayerMoney(playerid,20);
return 1;
}
if(dialogid == 1)
{
if(!response)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_RED,"You left the car");
}
else if(GetPlayerMoney(playerid) <= 20) return SendClientMessage(playerid,yourcolorhere,"You Don't Have Enough Money To Enter This Vehicle!");
else
{
GivePlayerMoney(playerid,-20);
}
return 1;
}
i think he was thinking more of this
pawn Код:
|
Just the same but you did that if you don't have 20$ you also can't do it. I just gave the basic. But thanks for updating it.
|