Jump to content

Car Owning


Guest FlameGod

Recommended Posts

Caute ludia vyrabam Car Owning lenze my to trochu nepali s tym vehicle id :d

chcel som to tak ze:

chlapik si kupi auto v predajni [hotove]

len a len on bude don vdiet nastupit ako vodic[nehotove] :d

takze trochu som rozmislal iked to boli a vymislel som ze by to mohlo byt tak ze si dam

 

new auto[MAX_PLAYERS]

/register
auto[playerid] = random(999999);
//auto sa bude rovnat 6miestnemu kodu

//a potom ked si ho kupi
auto[playerid] = CreateVehicle....
a tuto som sa sekol
ten 6miesny kod sa musi stat IDckom vozidla

a potom este riadok
if(!GetVehicleID(playerid) == kodu vozidla); pokial sa nerovna kodu vozidla tak ho to RemovePlayerFromVehicle...

 

-- stř 30. čer 2010 17:09:26 --

 

A este riadok ktory zisti kto vlastni to vozidlo a ked nie tak dam len ze nemas kluce :d

Link to comment
Share on other sites

new kod[MAX_PLAYERS];

new auto[MAX_PLAYERS];

new cislo = random(999999);

 

auto[playerid] = craetevehicle(....)

kod[playerid] = cislo;

 

if(GetVehicleID(playerid) == auto[playerid] && kod[playerid] != cislo){

SCM(playerid,color,"Niesi majitel"); ?

}

 

a potom

new Kluc[MAX_PLAYERS];

 

príkaz

Kluc[playerid] = cislo;

 

if(GetVehicleID(playerid) == auto[playerid] && kod[playerid] != cislo && Kluc[playerid] != cislo) return 0;

 

takto niak testuj

Link to comment
Share on other sites

new cislo = random(999999);

lenze toto je pre vsetkych hracov a ja chcem aby kazdy hrac mal ine cislo a ked si kupi auto tak sa to cislo bude rovnat IDcku vozidla

new Auto[playerid];

/reg
Auto[playerid] = random (999999);

kupa auta
Auto[playerid] = createvehicle(....)

if(!GetVehicleID(playerid) == auto[playerid])
{
SCM(playerid,color,"Nemas Kluce od tohoto auta");
RemovePlayerFromVeh...
}

ten kluc je to iste co kod len je to v prikaze....

 

hmmm takto?

srry superpreklik som do chel dat do pawno>help

 

-- stř 30. čer 2010 17:52:24 --

 

if(!GetPlayerVehicleID(playerid) == auto[playerid])

warning 213: tag mismatch

Link to comment
Share on other sites

new kod[MAX_PLAYERS];

new auto[MAX_PLAYERS];

new cislo = random(999999);

 

auto[playerid] = craetevehicle(....)

kod[playerid] = cislo;

 

if(GetVehicleID(playerid) == auto[playerid] && kod[playerid] != cislo){

SCM(playerid,color,"Niesi majitel"); ?

}

 

a potom

new Kluc[MAX_PLAYERS];

 

príkaz

Kluc[playerid] = cislo;

 

if(GetVehicleID(playerid) == auto[playerid] && kod[playerid] != cislo && Kluc[playerid] != cislo) return 0;

 

takto niak testuj

 

 

podle me to fungovat nebude ;) playerid = playerid a neco o tom random kodu nebo tak tam vubec nemas .. na tohle by sis musel udelat vetsi script se zapisem random cisla do adresare ... je to na nejakou tu hodinu kodovani ..

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...