09.04.2015, 12:51
Hello! ![Grin](images/smilies/biggrin.gif)
First you have to write the code in the following way:
So, if it doesn't do you should us send the code where you use Rentano[playerid], but where are you set the value?
Mencent
![Grin](images/smilies/biggrin.gif)
First you have to write the code in the following way:
PHP код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
new Vozilo = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && Vozilo == Rent[0] || Vozilo == Rent[1] || Vozilo == Rent[2] || Vozilo == Rent[3] || Vozilo == Rent[4] || Vozilo == Rent[5] || Vozilo == Rent[6] || Vozilo == Rent[7])
{
if(Rentano[playerid] != 0)return SendClientMessage(playerid,-1,""COLOR_CRVENA"Greska:{FFFFFF} Vozilo je vec iznajmljeno"),RemovePlayerFromVehicle(playerid);
ShowPlayerDialog(playerid,DIALOG_RENT,DIALOG_STYLE_LIST,""COLOR_ZUTA"Rent Vozila","{FFFFFF} ** "COLOR_SIVA"5 {FFFFFF}minuta\n** "COLOR_SIVA"15 {FFFFFF} minuta\n** "COLOR_SIVA"30 {FFFFFF} minuta","Iznajmi","Izlaz");
TogglePlayerControllable(playerid,0);
}
return 1;
}
Mencent
![cool](images/smilies/cool.png)