28.05.2016, 13:04
Quote:
|
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", 500, true);
forward Gate(playerid);
public Gate(playerid)


