Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-06-25, 15:47


xqz

otaku desu!






Wiek: 32
Na forum: 6407 dni
Posty: 723
Nick w MP: xqz

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

Ale jak mam to zrobic jako skrypt skoro chcesz ustawiac rodzaj silnika wedlug vehicleid?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-25, 16:04


akon823

Czekotubka :D






Wiek: 29
Na forum: 4816 dni
Posty: 399
Nick w MP: Remik14

Piwa: 152

Respekt: 76,8

Mo?na by wed?ug Vehicle Model ID i wtedy np. wszystkie buritto s? na gaz :P

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-26, 01:37


matiosek70







Wiek: 29
Na forum: 5213 dni
Posty: 58

Piwa: 64

Respekt: 50

Dobra to zr?b tak ?eby mog?em wpisywa? id pojazd?w tak jak ty zrobi?e? to w systemie kierunkowskaz?w w?asnym. Poporostu chce ?eby wiedzia?em gdzie co doda?. Np Napisz tak do ongammodeint dodaj to. na g?rze mapy dodaj to. ca?e ?adnie wyja?nione ?ebym wiedzia? jak dodawa? pojazdy znaczy rodzaj paliwa do ka?dego pojazdu. Bo takie info ?ebym to a to wklei? do komendy to mi nie pasi bo raczej tego "FuelInfo[ TUTAJ ] = 0; " nie b?de kopiowa? 100 razy ?eby ka?dy pojazd mia? to a to paliwo. Z g?ry thx. Oczywi?cie piwko dostaniesz . ;D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-26, 10:38


xqz

otaku desu!






Wiek: 32
Na forum: 6407 dni
Posty: 723
Nick w MP: xqz

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

matiosek70, jesli dla jakiegos pojazdu nie ustawisz innej wartosci niz 0 to bedzie ten pojazd mial benzyne. Czyli musisz uzyc tego na pojazdach ktore maja miec diesla albo gaz.




"matiosek70" napisał/a:

Dobra to zr?b tak ?eby mog?em wpisywa? id pojazd?w tak jak ty zrobi?e? to w systemie kierunkowskaz?w w?asnym.

?



W OnGameModeInit na przyklad masz:


Kod:

new car = CreateVehicle....
FuelInfo[car] = 1; //ustawiles mu gaz
new car2 = CreateVehicle....
FuelInfo[car2] = 2; //ustawiles mu diesel
new car3 = CreateVehicle....
//nic nie ustawiles to bedzie mial benzyne


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-26, 12:07


matiosek70







Wiek: 29
Na forum: 5213 dni
Posty: 58

Piwa: 64

Respekt: 50

Kod:

new car = CreateVehicle....
FuelInfo[car] = 1; //ustawiles mu gaz
new car2 = CreateVehicle....
FuelInfo[car2] = 2; //ustawiles mu diesel
new car3 = CreateVehicle....
//nic nie ustawiles to bedzie mial benzyne


mam to tak robi? ? Bo pojazdy mam dodawane tak:
Kod:

AddStaticVehicleEx(597,2278.0032,2476.4341,10.5882,180,51,1,0);



Dobra czyli tak to ma by??
Kod:

new car = AddStaticVehicleEx....
FuelInfo[car] = 1; //ustawiles mu gaz


[ Dodano: 2013-06-26, 12:29 ]
Dobra dzia?a ?adnie wszystko , dzi?ki wielkie masz browca.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-26, 12:40


xqz

otaku desu!






Wiek: 32
Na forum: 6407 dni
Posty: 723
Nick w MP: xqz

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

Ciesze si?, ?e w ko?cu si? uda?o xd

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-27, 20:43


Plastik

Uczeń PAWN






Wiek: 35
Na forum: 4754 dni
Posty: 36
Nick w MP: Sp3nNc3r

Piwa: 1337

Respekt: 48,6

Ostrzeżeń: 80%
A teraz ja mam pytanie zrobi mi kto? to w strcmp ?? ? daje piffo bo nie daje rady ...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-27, 20:47


xqz

otaku desu!






Wiek: 32
Na forum: 6407 dni
Posty: 723
Nick w MP: xqz

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

Chodzi o komende tankuj?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-28, 15:18


Plastik

Uczeń PAWN






Wiek: 35
Na forum: 4754 dni
Posty: 36
Nick w MP: Sp3nNc3r

Piwa: 1337

Respekt: 48,6

Ostrzeżeń: 80%
Tak te ca?e cmd disel benzyna Gaz to ca?e chce strcmp dzi?ki daje ---> :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-28, 15:41


xqz

otaku desu!






Wiek: 32
Na forum: 6407 dni
Posty: 723
Nick w MP: xqz

Piwa: 5465

Respekt: 418,6
Respekt: 418,6

Kod:

if(!strcmp(cmdtext,"/tankuj",true))
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, 0xFF0000FF, "Nie jeste? w poje?dzie!");
if(Stacjepaliw(playerid))
{
switch(FuelInfo[GetPlayerVehicleID(playerid)])
{
case 0: ShowPlayerDialog(playerid, 92, 1, "Tankowanie benzyny", "{FF8040}Wpisz ile litrow chcesz zatankowac./nCena jednego litra benzyny wynosi 5$.", "Tankuj", "Anuluj"),SetPVarInt(playerid,"wybor",0);
case 1: ShowPlayerDialog(playerid, 92, 1, "Tankowanie gazu", "{FF8040}Wpisz ile litrow chcesz zatankowac./nCena jednego litra gazu wynosi 2$.", "Tankuj", "Anuluj"),SetPVarInt(playerid,"wybor",1);
case 2: ShowPlayerDialog(playerid, 92, 1, "Tankowanie diesla", "{FF8040}Wpisz ile litrow chcesz zatankowac./nCena jednego litra oleju napedowego wynosi 4$.", "Tankuj", "Anuluj"),SetPVarInt(playerid,"wybor",2);
}
else SendClientMessage(playerid, CZERWONY, "Nie jestes na stacji paliw.");
return 1;
}



"Plastik" napisał/a:

Tak te ca?e cmd disel benzyna Gaz


Gdzie te komendy?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-28, 21:46


Plastik

Uczeń PAWN






Wiek: 35
Na forum: 4754 dni
Posty: 36
Nick w MP: Sp3nNc3r

Piwa: 1337

Respekt: 48,6

Ostrzeżeń: 80%
a przypu?cmy ze mam tak to jak wrzu?i? to do tej komendy i zrobi? blokade na auta np Tiry na disel durrito na benzyne a reszta infernus itp na gaz jak to zroi? ?? ?----->>> Dam :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-29, 10:32


matiosek70







Wiek: 29
Na forum: 5213 dni
Posty: 58

Piwa: 64

Respekt: 50

Tak robisz:
Kod:

new car = AddStaticVehicleEx....
FuelInfo[car] = 1; //ustawiles mu gaz


Masz w mapie/skrypcie pojazdy dodwane funkcj? AddStaticVehicleEx.... albo tak? CreateVehicle to poprostu zmieniasz na takie co? :

Kod:

new car = AddStaticVehicleEx....
FuelInfo[car] = 1; //ustawiles mu gaz
new car2 = AddStaticVehicleEx....
FuelInfo[car2] = 1; //ustawiles mu gaz
new car3 = AddStaticVehicleEx....
FuelInfo[car3] = 1; //ustawiles mu gaz
itd...


albo

Kod:

new car = CreateVehicle....
FuelInfo[car] = 1; //ustawiles mu gaz
new car2 = CreateVehicle....
FuelInfo[car2] = 1; //ustawiles mu gaz
new car3 = CreateVehicle....
FuelInfo[car3] = 1; //ustawiles mu gaz
itd....


Ja tak robie i mi wszystko pi?knie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-29, 11:29


Plastik

Uczeń PAWN






Wiek: 35
Na forum: 4754 dni
Posty: 36
Nick w MP: Sp3nNc3r

Piwa: 1337

Respekt: 48,6

Ostrzeżeń: 80%
No ok masz piwo i respa tak jak xqz tylko mam tak? cmd

Kod:

if(strcmp(cmdtext,"/tankuj",true)==0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_YELLOW,"Musisz by? kierowc? w poje?dzie."); }
if(IsPlayerInRangeOfPoint(playerid, 16, .............................) ||// LV-LOT ====== Z LV============================================
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, ..............................) ||
IsPlayerInRangeOfPoint(playerid, 16, ..............................) ||// ====================SF=========================================================
IsPlayerInRangeOfPoint(playerid, 16, .....................) ||
IsPlayerInRangeOfPoint(playerid, 16, .......................) ||
IsPlayerInRangeOfPoint(playerid, 16, ........................) ||
IsPlayerInRangeOfPoint(playerid, 16, ........................) ||
IsPlayerInRangeOfPoint(playerid, 16, ..................) ||
IsPlayerInRangeOfPoint(playerid, 16, ......................) ||//==============LS=========================================================================
IsPlayerInRangeOfPoint(playerid, 16, ..................) ||
IsPlayerInRangeOfPoint(playerid, 16, ......................) ||//Po drodze do LS
IsPlayerInRangeOfPoint(playerid, 16, ......................) || //tankujlvlot2
IsPlayerInRangeOfPoint(playerid, 16, ......................) || // Firma :D :D:D
IsPlayerInRangeOfPoint(playerid, .....................))
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
new VID;
new FillUpz;
//new string[256];
VID = GetPlayerVehicleID(playerid);
FillUpz = GasZwykly - Gas[VID];
Gas[VID] += FillUpz;
FillUpz = FillUpz * 1;
monej[playerid]=monej[playerid]-FillUpz*3;
GivePlayerMoney(playerid,-FillUpz*3);
format(string, sizeof(string), "Zatankowa?e? do pe?nego baku ( %d Litry(?w) ) za %d $.",FillUpz, FillUpz*3);
SendClientMessage(playerid, COLOR_YELLOW, string);
PlayerPlaySound(playerid, 1165,x,y,z);
GameTextForPlayer(playerid, "~h~~y~Tankowanie...", 2000, 6);
SetTimerEx("tankowanie", 10000, 0, "d", playerid);
TogglePlayerControllable(playerid, 0);
}
return 1;
}



i jak to doda? te kordy do waszej cmd tankuj ?? ?

[ Dodano: 2013-06-29, 11:31 ]
No i jak zrobie to
Kod:

new car = CreateVehicle....
FuelInfo[car] = 1; //ustawiles mu gaz
new car2 = CreateVehicle....
FuelInfo[car2] = 1; //ustawiles mu gaz
new car3 = CreateVehicle....
FuelInfo[car3] = 1; //ustawiles mu gaz
itd....



bla bla to gdzie to wklejam ?? ? przy firmach frakcjach gdzie mam pojazdy czy wszystko pod sob?... ?? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-29, 12:29


akon823

Czekotubka :D






Wiek: 29
Na forum: 4816 dni
Posty: 399
Nick w MP: Remik14

Piwa: 152

Respekt: 76,8

"Plastik" napisał/a:

No i jak zrobie to
Kod:

new car = CreateVehicle....
FuelInfo[car] = 1; //ustawiles mu gaz
new car2 = CreateVehicle....
FuelInfo[car2] = 1; //ustawiles mu gaz
new car3 = CreateVehicle....
FuelInfo[car3] = 1; //ustawiles mu gaz
itd....



bla bla to gdzie to wklejam ? przy firmach frakcjach gdzie mam pojazdy czy wszystko pod sob?... ?


W OnGameModeInit masz stworzone pojazdy ;] powiedzmy tak :
Kod:

AddStaticVehicleEx(490,-1574.0999800,718.2000100,-4.9000000,89.7690000,-1,-1,SPAWN); //FBI Rancher

to po prostu dajesz to :
"Plastik" napisał/a:

new car =
Cytat:

CreateVehicle....

FuelInfo[car] = 1; //ustawiles mu gaz
new car2 = CreateVehicle....
FuelInfo[car2] = 1; //ustawiles mu gaz
new car3 = CreateVehicle....
FuelInfo[car3] = 1; //ustawiles mu gaz
itd....

I tam gdzie jest wpisane
"Plastik" napisał/a:

CreateVehicle....

to dajesz swoje auto w moim przypadku to
Kod:

AddStaticVehicleEx(490,-1574.0999800,718.2000100,-4.9000000,89.7690000,-1,-1,SPAWN); //FBI Rancher


Ju? wiesz?;p

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-06-29, 14:13


Plastik

Uczeń PAWN






Wiek: 35
Na forum: 4754 dni
Posty: 36
Nick w MP: Sp3nNc3r

Piwa: 1337

Respekt: 48,6

Ostrzeżeń: 80%
Kurde to wiem ale poprostu pytam jak mam taka cmd
Kod:

if(strcmp(cmdtext,"/tankuj",true)==0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_YELLOW,"Musisz by? kierowc? w poje?dzie."); }
if(IsPlayerInRangeOfPoint(playerid, 16, .............................) ||// LV-LOT ====== Z LV============================================
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, .............................) ||
IsPlayerInRangeOfPoint(playerid, 16, ..............................) ||
IsPlayerInRangeOfPoint(playerid, 16, ..............................) ||// ====================SF=========================================================
IsPlayerInRangeOfPoint(playerid, 16, .....................) ||
IsPlayerInRangeOfPoint(playerid, 16, .......................) ||
IsPlayerInRangeOfPoint(playerid, 16, ........................) ||
IsPlayerInRangeOfPoint(playerid, 16, ........................) ||
IsPlayerInRangeOfPoint(playerid, 16, ..................) ||
IsPlayerInRangeOfPoint(playerid, 16, ......................) ||//==============LS=========================================================================
IsPlayerInRangeOfPoint(playerid, 16, ..................) ||
IsPlayerInRangeOfPoint(playerid, 16, ......................) ||//Po drodze do LS
IsPlayerInRangeOfPoint(playerid, 16, ......................) || //tankujlvlot2
IsPlayerInRangeOfPoint(playerid, 16, ......................) || // Firma :D :D :D
IsPlayerInRangeOfPoint(playerid, .....................))
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
new VID;
new FillUpz;
//new string[256];
VID = GetPlayerVehicleID(playerid);
FillUpz = GasZwykly - Gas[VID];
Gas[VID] += FillUpz;
FillUpz = FillUpz * 1;
monej[playerid]=monej[playerid]-FillUpz*3;
GivePlayerMoney(playerid,-FillUpz*3);
format(string, sizeof(string), "Zatankowa?e? do pe?nego baku ( %d Litry(?w) ) za %d $.",FillUpz, FillUpz*3);
SendClientMessage(playerid, COLOR_YELLOW, string);
PlayerPlaySound(playerid, 1165,x,y,z);
GameTextForPlayer(playerid, "~h~~y~Tankowanie...", 2000, 6);
SetTimerEx("tankowanie", 10000, 0, "d", playerid);
TogglePlayerControllable(playerid, 0);
}
return 1;
}


I on juz jest ze stacjami to do tamtej cmd /tankuj odda?ie mi to all ?

Postaw piwo autorowi tego posta
 

 
Tagi: system :: paliw
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] System paliw Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku