Jump to content
  • 0

pomoc [HELP]Nemáš řidičák


dandiss

Dotaz

Dobrý den chtěl bych se zeptat jestli mi někdo neporadí potřebuju aby nastoupil hráč do auta bez ridičaku napíše mu to nemáš řidičák ale aby to bylo jen u aut ne u letadel .. prosím poraďte

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(GetVehicleModel(veh) != lietadlo1 || GetVehicleModel(veh) != lietadlo2 || GetVehicleModel(veh) != lietadlo3) // a tak ďalej, si nájdeš na wiki
{
SCM(playerid,-1,"Nemáš vodičák vypadni z auta");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
///alebo použíješ tento stock
stock IsPlayerInFlyingVehicle(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 460,464,476,511,512,513,519,520,553,577,592,593,417,425,447,465,469,487,488,497,501,548,563:
{
return true;
}
}
return false;
}
//a bude to vyzerať takto:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(!IsPlayerInFlyingVehicle(veh))
{
SCM(playerid,-1,"Nemáš vodičák vypadni z auta");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}

Link to comment
Share on other sites

  • 0

Do public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)

dáš

if(ridicak[playerid] == 0) return SendClientMessage(playerid,barva,"Nemate ridicky prukaz");

 

ale zmen si if(ridicak nwm co pouzivas

Link to comment
Share on other sites

  • 0

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(GetVehicleModel(veh) != lietadlo1 || GetVehicleModel(veh) != lietadlo2 || GetVehicleModel(veh) != lietadlo3) // a tak ďalej, si nájdeš na wiki
{
SCM(playerid,-1,"Nemáš vodičák vypadni z auta");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
///-------alebo použíješ tento stock
stock IsPlayerInFlyingVehicle(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 460,464,476,511,512,513,519,520,553,577,592,593,417,425,447,465,469,487,488,497,501,548,563:
{
return true;
}
}
return false;
}
//a bude to vyzerať takto:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(!IsPlayerInFlyingVehicle(veh))
{
SCM(playerid,-1,"Nemáš vodičák vypadni z auta");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}

HOTOV DÍKY lock

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...