Jump to content
  • 0

pomoc Kupa auta pre hraca


kernel252

Dotaz

Caute. Potreboval by som script. Ked hrac napise /automenu tak mu to zobrazi menu z autami (!!! TO MENU SI SPRAVIM !!!) a ked si hrac vybere tak mu to da auto a moze don ho nastupit iba on a nikto iny.

Dakujem.

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0

if(strcmp(cmdtext, "/automenu", true) == 0) ShowMenuForPlayer(automenu,playerid);

public OnPlayerSelectedMenuRow(playerid,row)
{
if(GetPlayerMenu(playerid) == automenu)//kdyz odsouhlasi menu ke koupi auta
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);//zjistime pozici
new vehicleid = CreateVehicle(auto,X+5,Y+5,Z,0,random(126),random(126));//vytvorime auto vedle nej s nahodvou barou
for(new i=0;i{
if(IsPlayerConnected(i))//obsazene sloty
{
if(i != playerid) SetVehicleParamsForPlayer(vehicleid,i,0,1);//kdyz slot neni ten hrac zamkneme tomu hraci auto
//proste do auta muze nastopis pouze ten kterej si auto vyvola
}
}
}
return 1;
}

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...