Rent System


Započeo Hunter.#, Decembar 12, 2019, 15:58:11 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Napravio sam rent system i postavio sam rent da traje 10min,ali ne prodju ni 2 min vozilo se samo respawnuje bez da se unrenta,respawnuje se na mjestu gde je uzeto,probao sam nes kao na SA sto je novi rent system da napravim
Dio skripte:
YCMD:unrent(playerid, params[],help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"[BC:RP]"CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
	if(Rentano[playerid] == 299) return SCM(playerid,-1,""SIVA"Niste iznajmili vozilo!");
	if(Rentano[playerid] != 299)
	{
		DestroyVehicle(vozilorentee[playerid]);
		Rentano[playerid] = 299;
		SCM(playerid,-1,""SRWBOJA"[RENT]: "BELA"Vise ne iznajmljujete vozilo!");
	}
	return 1;
}
if(vozilorentee[playerid] == vehicleid)
	{
		SetTimerEx("UNRENT", 10*60*1000, 0, "i", playerid);
	}
	return 1;
}
forward UNRENT(playerid);
public UNRENT(playerid)
{
	if(Rentano[playerid] != 299)
	{
		DestroyVehicle(vozilorentee[playerid]);
		Rentano[playerid] = 299;
		SCM(playerid,-1,""SRWBOJA"[RENT]: "BELA"Vise ne iznajmljujete vozilo!");
	}
	return 1;
}
if(PlayerInfo[playerid][pNovacDzep] < 120) { SCM(playerid,-1,""SIVA"Nemate dovoljno novca "ZELENA"(120$)"SIVA"!"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
			SCM(playerid,-1,""SRWBOJA"[INFO]: "BELA"Rentali ste Nebula za "ZELENA"120$.");
			new Float:xee, Float:yee, Float:zee;
			GetPlayerPos(playerid, xee, yee, zee);
  			vozilorentee[playerid] = AddStaticVehicle(516,xee,yee,zee,0,-1,-1);
  			PutPlayerInVehicle(playerid,vozilorentee[playerid],0);
  			Rentano[playerid] = GetPlayerVehicleID(playerid);
  			g_NovacMinus(playerid,120);//Ovo je kad udjes u pickup i izadje ti meni da rentas koje vozilo oces

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Poslednja Izmena: Decembar 12, 2019, 16:01:18 POSLE PODNE od Legend..

Daj liniju koda gde kreiras auto

Mnogo imaš ti još da jedeš kačamak.
skrr
Moj tutorijali: Bazilion indent warninga
WORK? : Smart Project 1.2 , Leskovacki Detmec, Rodjendanski  server


Penzionisani balkanski samp kripter


Citat: bunta poslato Decembar 12, 2019, 16:26:28 POSLE PODNE
Daj liniju koda gde kreiras auto
Evo ovo je celo gde uzimas vozilo
if(PlayerInfo[playerid][pNovacDzep] < 120) { SCM(playerid,-1,""SIVA"Nemate dovoljno novca "ZELENA"(120$)"SIVA"!"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
			SCM(playerid,-1,""SRWBOJA"[INFO]: "BELA"Rentali ste Nebula za "ZELENA"120$.");
			new Float:xee, Float:yee, Float:zee;
			GetPlayerPos(playerid, xee, yee, zee);
  			vozilorentee[playerid] = AddStaticVehicle(516,xee,yee,zee,0,-1,-1);
  			PutPlayerInVehicle(playerid,vozilorentee[playerid],0);
  			Rentano[playerid] = GetPlayerVehicleID(playerid);
  			g_NovacMinus(playerid,120);//Ovo je kad udjes u pickup i izadje ti meni da rentas koje vozilo oces

Oće to kad si glup i ne pročitaš mrtvi docs.

AddStaticVehicle radi samo unutar OnGameModeInit() jer kreira pre-loadane modele vozila...;

Solution: CreateVehicle


Sirah says
Chillin' in Kyoto grand with my man Skrill
Chain smokin' nicotine sayin' fuck a fast deal
We got that white girl so we make those skrill checks
Fuck a white girl, talk ill, neck karate chop her grill, bitch I kill
Born from the center of a storm
All these boys flappin' gums about how they're hard, bitch I'm harder
Martyr to the swag on the corner
Beat your girl with the drums as the bass makes that bitch cum
Bass makes that bitch cum




Laughin' at the world.


Citat: Skrillex. poslato Decembar 13, 2019, 16:26:55 POSLE PODNE
Oće to kad si glup i ne pročitaš mrtvi docs.

AddStaticVehicle radi samo unutar OnGameModeInit() jer kreira pre-loadane modele vozila...;

Solution: CreateVehicle
Hvala brate