[pomoc] /rentcar

Započeo .::Wuj0::., April 17, 2011, 10:37:28 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

skripta koju koristim: Cyber
Opis problema: Kada sjednem za motor da iznajmim iznajmljujem ga komandom /rentcar a ne /rentbike. Kako da stavim da kad iznajmljujem motor da pisem /rentbike
Ajde,Ajde da divljamo kao stoka da pijemo,crno bele da bodrimo,jer Partizan mi volimo....!!!!

Don't learn to hack. Hack to learn!

aj nadi u modu komandu pa je postaj
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

CMD:rentcar(playerid,params[])
{
   new
   string[128];
   if(RentaBike[playerid] == 0)
   {
	    if(JB_GetPlayerMoney(playerid) < 30) { SCM(playerid,COLOR_GRAD4,"[Greska]: Nemas dovoljno novaca."); return 1; }
		new hirefee = HireCost(GetPlayerVehicleID(playerid));
		HireCar[playerid] = GetPlayerVehicleID(playerid);
		OnPropUpdate();
		RentaBike[playerid] = 1;
		JB_GivePlayerMoney(playerid,-250);
		PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
		format(string, sizeof(string), "~w~Unajmio si vozilo~n~koristi ~p~/lock",hirefee);
		TogglePlayerControllable(playerid, 1);
		GameTextForPlayer(playerid, string, 5000, 3);
    }
    else
    {
	    SCM(playerid,COLOR_GRAD4,"[Greska]: Vec imate rentano vozilo.");
    }
    return 1;
}


eto
Ajde,Ajde da divljamo kao stoka da pijemo,crno bele da bodrimo,jer Partizan mi volimo....!!!!

Don't learn to hack. Hack to learn!

CitatCMD:rentcar(playerid,params[])
{
   new
   string[128];
   if(RentaBike[playerid] == 0)
   {
       if(JB_GetPlayerMoney(playerid) < 30) { SCM(playerid,COLOR_GRAD4,"[Greska]: Nemas dovoljno novaca."); return 1; }
      new hirefee = HireCost(GetPlayerVehicleID(playerid));
      HireCar[playerid] = GetPlayerVehicleID(playerid);
      OnPropUpdate();
      RentaBike[playerid] = 1;
      JB_GivePlayerMoney(playerid,-250);
      PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
      format(string, sizeof(string), "~w~Unajmio si vozilo~n~koristi ~p~/lock",hirefee);
      TogglePlayerControllable(playerid, 1);
      GameTextForPlayer(playerid, string, 5000, 3);
    }
    else
    {
       SCM(playerid,COLOR_GRAD4,"[Greska]: Vec imate rentano vozilo.");
    }
    return 1;
}

ovo : CMD:rentcar(playerid,params[])
Zamjenis : CMD:rentbike(playerid,params[])

Zar mi se nebi onda promijenilo da i kad udjem u kola da rentam da tamo moram da pisem /rentbike
Ajde,Ajde da divljamo kao stoka da pijemo,crno bele da bodrimo,jer Partizan mi volimo....!!!!

Don't learn to hack. Hack to learn!

To moras promjeniti di je ono carid == [nekiid] pa stavis da od tog vozila do nekog kojeg zelis pise /rentbike

ovako kako ti je vedran rekao i tu pr ivrhu sto imas if(RentaBike[playerid] == 0) promijeni u if(RentaCar[playerid] == 0)
znaci ovo ti je 2 komanda,nemoze ti sve biti u jednoj!

i onda dobijes ovo:
CMD:rentbike(playerid,params[])
{
   new
   string[128];
   if(RentaCar[playerid] == 0)
   {
       if(JB_GetPlayerMoney(playerid) < 30) { SCM(playerid,COLOR_GRAD4,"[Greska]: Nemas dovoljno novaca."); return 1; }
      new hirefee = HireCost(GetPlayerVehicleID(playerid));
      HireCar[playerid] = GetPlayerVehicleID(playerid);
      OnPropUpdate();
      RentaBike[playerid] = 1;
      JB_GivePlayerMoney(playerid,-250);
      PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
      format(string, sizeof(string), "~w~Unajmio si vozilo~n~koristi ~p~/lock",hirefee);
      TogglePlayerControllable(playerid, 1);
      GameTextForPlayer(playerid, string, 5000, 3);
    }
    else
    {
       SCM(playerid,COLOR_GRAD4,"[Greska]: Vec imate rentano vozilo.");
    }
    return 1;
}
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Daje ove errore:
C:\Users\Zabjelo\Desktop\Samp\Tuborg RolePlay\gamemodes\Tuborg.pwn(27469) : error 017: undefined symbol "RentaCar"
C:\Users\Zabjelo\Desktop\Samp\Tuborg RolePlay\gamemodes\Tuborg.pwn(27469) : warning 215: expression has no effect
C:\Users\Zabjelo\Desktop\Samp\Tuborg RolePlay\gamemodes\Tuborg.pwn(27469) : error 001: expected token: ";", but found "]"
C:\Users\Zabjelo\Desktop\Samp\Tuborg RolePlay\gamemodes\Tuborg.pwn(27469) : error 029: invalid expression, assumed zero
C:\Users\Zabjelo\Desktop\Samp\Tuborg RolePlay\gamemodes\Tuborg.pwn(27469) : fatal error 107: too many error messages on one line


a ovo je ta linija:
   if(RentaCar[playerid] == 0)
Ajde,Ajde da divljamo kao stoka da pijemo,crno bele da bodrimo,jer Partizan mi volimo....!!!!

Don't learn to hack. Hack to learn!


Hvala, radi :)
Ajde,Ajde da divljamo kao stoka da pijemo,crno bele da bodrimo,jer Partizan mi volimo....!!!!

Don't learn to hack. Hack to learn!