How do i make gate open and close? Please help me with this small thing
#7

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
This?
Код:
new GateObj;

public OnGameModeInit()
{
	GateObj = CreateDynamicObject(988, -488.89850, -562.67981, 25.35821,   0.00000, 0.00000, 0.00000);
	SetTimer("Gate", 500, true);
	
	return 1;
}

forward Gate(playerid);
public Gate(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid, 7.0, 488.89850, -562.67981, 25.35821))
	{
		new Name[24];
		GetPlayerName(playerid, Name, 24);
		
		if(strfind(Name, "[BD]", true) != -1) MoveObject(GateObj, -488.89850, -562.67981, 35.35821, 5.0, 0.0, 0.0, 0.0);
	}
	else MoveDynamicObject(GateObj, -488.89850, -562.67981, 25.35821, 5.0, 0.0, 0.0, 0.0);
	
	return 1;
}
PHP код:
SetTimer("Gate"500true);
forward Gate(playerid);
public 
Gate(playerid
where did playerid come from :/ ?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)