how to make this
#2

here ill give your a basic idea
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
              ShowPlayerDialog(playerid, dialogid, style, "something here", "Accept" , "Decline");
        }
        return 1;
}
now you got to have response to the dialog you just made
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(response)
        {
        switch(dialogid)
        {
        case 1:
        {

        case 0:
        {
        if(GetPlayerMoney(playerid) > 500)
        {
              SendClientMessage(playerid, COLOR, "You Dont Have Enough Money");
              RemovePlayerFromVehicle(playerid);
        }
        else if(GetPlayerMoney(playerid) < 500)
        {
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, COLOR, "You Have Rented This Vehicle");
        }
      }
    }
  }
  return 1;
}
There ya go, that should work, but if you get out of the vehicle you would more then likely have to rent it again, you would have to set a timer , and sorry for bad indent dont like forums cant hit tab
Reply


Messages In This Thread
how to make this - by dot - 06.02.2011, 11:06
Re: how to make this - by fangoth1 - 06.02.2011, 11:34
Re: how to make this - by alpha500delta - 06.02.2011, 11:37
Re: how to make this - by fangoth1 - 06.02.2011, 11:59
Re: how to make this - by admantis - 06.02.2011, 12:10
Re: how to make this - by fangoth1 - 06.02.2011, 12:16

Forum Jump:


Users browsing this thread: 3 Guest(s)