Jump to content
  • 0

pomoc Co mam špatně? GetVehicleModel


Benalek

Dotaz

 
Nahoře v modu:
 
new Autos[MAX_PLAYERS] = {
400,401,402,404,405,409,410,411,412,412,414,415,418,419,420,421,422,423,424,426,429,434,436,438,
439,440,442,444,445,451,457,458,458,466,467,470,474,475,477,478,479,480,482,483,485,489,490,491,
492,494,495,496,500,503,504,505,506,507,508,516,517,518,525,526,527,528,529,530,531,533,534,535,
536,540,541,542,543,545,546,547,549,550,551,552,554,555,556,557,558,558,560,561,562,565,566,567,
568,574,575,576,579,582,582,583,585,587,589,588,596,597,598,599,600,601,602,603,604,605
};
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Typ = GetVehicleModel(vehicleid);
if(AutoskolaB[playerid] == 0)
    {
    if(Typ == Autos[playerid])
{
SendClientMessage(playerid, B_BILA, "Nemáš řidičák typu (D) Můžeš být pokutován!");
}}
return 1;
}
Žádný Error nepíše, ale ve hře to taky nic neukáže :( Díky moc :)

 

Link to comment
Share on other sites

10 odpovědí na tuto otázku

Recommended Posts

  • 0

 

#include <a_samp>
 
new AutoskolaB[1];
 
new Autos[] =
{
400,401,402,404,405,409,410,411,412,412,414,415,418,419,420,421,422,423,424,426,429,434,436,438,
439,440,442,444,445,451,457,458,458,466,467,470,474,475,477,478,479,480,482,483,485,489,490,491,
492,494,495,496,500,503,504,505,506,507,508,516,517,518,525,526,527,528,529,530,531,533,534,535,
536,540,541,542,543,545,546,547,549,550,551,552,554,555,556,557,558,558,560,561,562,565,566,567,
568,574,575,576,579,582,582,583,585,587,589,588,596,597,598,599,600,601,602,603,604,605
};
 
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Typ = GetVehicleModel(GetPlayerVehicleID(playerid));
if(AutoskolaB[playerid] == 0)
{
   for(new a; a <= sizeof(Autos); a++)
   {
     if(Typ == Autos[a])
{
SendClientMessage(playerid, 0xFFFFFFAA, "Nemáš řidičák typu (D) Můžeš být pokutován!");
}
}
}
return 1;
}
Link to comment
Share on other sites

  • 0

Vytvoreni pole o jednom prvku ma jakej smysl?

Proc zjistovat ID pres dalsi funkci, kdyz ti ho poskytuje sama funkce?

Pro jinyho hrace nez id 0 je index mimo pole.

 

 

tú jednotku som tam dal len preto lebo sa mi nechcelo písať MAX_PLAYERS ak ti to nedošlo  -_- (kvôli kompilácii aby mi to nehodilo error)

S tým ID máš pravdu, nepozrel som aký to je public, robil som to v ako State Change = Hovorím že som dlho "neprogramoval"

Link to comment
Share on other sites

  • 0

To mi fakt nedošlo no.

 

Hádam si nemyslíš že mu dám skript ktorý si len skopíruje a stlačí F5 :d 

 

Ja som veľmi lenivý človek, si zapamätaj do budúcna aby si nebol prekvapený zas :d 

Link to comment
Share on other sites

  • 0

#include <a_samp>
 
new AutoskolaB[MAX_PLAYERS];
 
new Autos[] =
{
400,401,402,404,405,409,410,411,412,412,414,415,418,419,420,421,422,423,424,426,429,434,436,438,
439,440,442,444,445,451,457,458,458,466,467,470,474,475,477,478,479,480,482,483,485,489,490,491,
492,494,495,496,500,503,504,505,506,507,508,516,517,518,525,526,527,528,529,530,531,533,534,535,
536,540,541,542,543,545,546,547,549,550,551,552,554,555,556,557,558,558,560,561,562,565,566,567,
568,574,575,576,579,582,582,583,585,587,589,588,596,597,598,599,600,601,602,603,604,605
};
 
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Typ = GetVehicleModel(GetPlayerVehicleID(playerid));
if(AutoskolaB[playerid] == 0)
{
   for(new a; a <= sizeof(Autos); a++)
   {
    if(Typ == Autos[a])
{
SendClientMessage(playerid, 0xFFFFFFAA, "Nemáš řidičák typu (D) Můžeš být pokutován!");
break;
}
}
}
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...