Problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem (
/showthread.php?tid=264559)
Problem -
bartje01 - 26.06.2011
Hey all.
Why does this only works for rent1?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new v;
v = rent1||rent2;
if ((newstate == PLAYER_STATE_DRIVER))
{
if(GetPlayerVehicleID(playerid) == v )
{
ShowPlayerDialog(playerid,RENT,DIALOG_STYLE_MSGBOX,"Vehicle Rent","Do you want to rent this vehicle for $100?","Yes","No");
}
}
return 1;
}
Re: Problem -
Wesley221 - 26.06.2011
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == rent1 || GetPlayerVehicleID(playerid) == rent2 )
{
ShowPlayerDialog(playerid,RENT,DIALOG_STYLE_MSGBOX,"Vehicle Rent","Do you want to rent this vehicle for $100?","Yes","No");
}
}
return 1;
}
This will work
Re: Problem -
bartje01 - 26.06.2011
Ah ye sthanks. I did this earlier but I forgot how to do this. Now I rememberi t again. Thanks !