Oko kapija

Započeo draganbratic, Avgust 30, 2021, 17:12:16 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Ne znam nikako kako da popravim ovu kapiju da mi se otvara pa zatvara dodjem do nje nece da se otvori
Mod: Nez tacno nek SA scripta mozda nes je u tom fazonu
Deo skripte:
  	if(IsPlayerInRangeOfPoint(playerid, 10.0, 1419.65210, -1649.16248, 15.29059)) //Vip kapija
	{
	if(PlayerInfo[playerid][pVip] >= 1 && PlayerInfo[playerid][pAdmin] >=1)
	{
	MoveObject(vipkapija, 1419.65210, -1649.16248, 9.12796, 2.00);
	KapijeTimer[playerid] = SetTimer("zatvorivip", 7000, 0);
	format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
	e_RadiusMSG(20.0, playerid, HEX_PROX, string);
	SCM(playerid,-1,""SRWBOJA"VIP BAZA | "SIVA"Kapija je otvorena i zatvorice se automatski!");
	}
	else return SCM(playerid,-1, ""SRWBOJA"[VIP BAZA] "BELA"Samo Vipovi!");
	}


a evo i public i forward
forward zatvorivip();
public zatvorivip()
{
	MoveObject(vipkapija,1419.65210, -1649.16248, 15.29059, 2.00);
	return 1;
}
Poslednja Izmena: Septembar 07, 2021, 19:01:09 POSLE PODNE od M Ө M Σ N Z I


Zameni sa:

        if(IsPlayerInRangeOfPoint(playerid, 10.0, 1419.65210, -1649.16248, 15.29059)) //Vip kapija
        {
            if(PlayerInfo[playerid][pVip] >= 1 || PlayerInfo[playerid][pAdmin] >=1)
            {
                MoveObject(vipkapija, 1419.65210, -1649.16248, 9.12796, 2.00);
                KapijeTimer[playerid] = SetTimer("zatvorivip", 7000, 0);
                format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
                e_RadiusMSG(20.0, playerid, HEX_PROX, string);
                SCM(playerid,-1,""SRWBOJA"VIP BAZA | "SIVA"Kapija je otvorena i zatvorice se automatski!");
            }
            else return SCM(playerid,-1, ""SRWBOJA"[VIP BAZA] "BELA"Samo Vipovi!");
        }
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.

if(PlayerInfo[playerid][pVip] >= 1 && PlayerInfo[playerid][pAdmin] >=1) //ovo ti nabraja sta sve kao 1 igrac(u ovome slucaju i vip i admin) moras biti da bi  otvorio

if(PlayerInfo[playerid][pVip] >= 1 || PlayerInfo[playerid][pAdmin] >=1) //ovo ti nabraja sta pojedinacno mozes imati da bi otvorio u ovome slucaju ili vip ili admin 


Razlika je u && i ||
Upwork Skills
Back-end:
• PHP Frameworks (Laravel, Symfony,Codeigniter)
• Python/Django
• Node.js

Front-end:
• HTML
• CSS pre-processing (SASS, LESS)
• Javascript (JQuery, Ajax, Vue, Angular, React, etc.)
• Bootstrap

CMS
• Wordpress (Woocommerce)
• Shopify, Magento

Citat: ᴛʜᴇꜱᴍᴏᴋᴇ poslato Avgust 30, 2021, 17:26:47 POSLE PODNE
Zameni sa:

        if(IsPlayerInRangeOfPoint(playerid, 10.0, 1419.65210, -1649.16248, 15.29059)) //Vip kapija
        {
            if(PlayerInfo[playerid][pVip] >= 1 || PlayerInfo[playerid][pAdmin] >=1)
            {
                MoveObject(vipkapija, 1419.65210, -1649.16248, 9.12796, 2.00);
                KapijeTimer[playerid] = SetTimer("zatvorivip", 7000, 0);
                format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
                e_RadiusMSG(20.0, playerid, HEX_PROX, string);
                SCM(playerid,-1,""SRWBOJA"VIP BAZA | "SIVA"Kapija je otvorena i zatvorice se automatski!");
            }
            else return SCM(playerid,-1, ""SRWBOJA"[VIP BAZA] "BELA"Samo Vipovi!");
        }


nista ne radi opet

Koristi MoveDynamicObject umjesto MoveObject

MoveDynamicObject(STREAMER_TAG_OBJECT objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0)


MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)

Citat: ʟᴀᴋᴇʀɪɴɢ poslato Septembar 04, 2021, 22:43:39 POSLE PODNE
Koristi MoveDynamicObject umjesto MoveObject

MoveDynamicObject(STREAMER_TAG_OBJECT objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0)


MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)


jesam koristio ssam prvo to , pa sam onda probao MoveObject. Ne radi mi ni jedno ni drugo

Probaj ovako aj
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1419.65210, -1649.16248, 15.29059)) //Vip kapija
{
	if(PlayerInfo[playerid][pVip] >= 1 || PlayerInfo[playerid][pAdmin] >=1)
	{
		new bool:vipkapijatimer // stavi je negdje pri vrhu 
		if(vipkapijatimer) return 1;
		MoveObject(vipkapija, 1419.65210, -1649.16248, 9.12796, 2.00);
		KapijeTimer[playerid] = SetTimer("zatvorivip", 7000, 0);
		vipkapijatimer = true;
		format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
		e_RadiusMSG(20.0, playerid, HEX_PROX, string);
		SCM(playerid,-1,""SRWBOJA"VIP BAZA | "SIVA"Kapija je otvorena i zatvorice se automatski!");
	}
	else return SCM(playerid,-1, ""SRWBOJA"[VIP BAZA] "BELA"Samo Vipovi!");
}

forward zatvorivip();
public zatvorivip()
{
	MoveObject(vipkapija,1419.65210, -1649.16248, 15.29059, 2.00);
	vipkapijatimer = false;
	return 1;
}