07.03.2015, 19:51
(
Last edited by Fantje; 07/03/2015 at 10:17 PM.
)
FIXED, THANK YOU GUYS. THIS FORUM IS REALLY HELPFULL
new autogate;
Forward:
forward close();
On the bottom of the gamemode:
public close()
{
MoveObject(autogate,-308.49820, 1508.65869, 74.33560,3);
return 1;
}
Under GameModeInit:
autogate = CreateObject(987, -308.49820, 1508.65869, 74.33560, 0.00000, 0.00000, 0.00000);
Under OnPlayerUpdate:
if(IsPlayerInRangeOfPoint(playerid,8,-308.49820, 1508.65869, 74.33560))
{
If(PlayerInfo[playerid][pLevel]<2) return SendClientMessage(Playerid,COLOR_RED,"You need to be level 2+");
{
MoveObject(autogate,-308.49820, 1508.65869, 68.10109,3);
SetTimer("close",4000,0);
return 1;
}
change with your own loops etc.
PHP Code:
|
public OnPlayerUpdate(playerid)
{
if(PlayerInfo[playerid][dRank]<1) return SendClientMessage(playerid,COLOR_YELLOW,"You need to be DONATOR");
{
MoveObject(autogate,-308.49820, 1508.65869, 68.10109,3);
SetTimer("close",4000,0);
return 1;
}
return 1;
}
C:\Users\Administrator\Desktop\ProjectSvT\gamemodes\SvTMike.pwn(14100) : warning 225: unreachable code
return 1;
public OnPlayerUpdate(playerid)
{
if(PlayerInfo[playerid][dRank]<1) return SendClientMessage(playerid,COLOR_YELLOW,"You need to be DONATOR");
{
MoveObject(autogate,-308.49820, 1508.65869, 68.10109,3);
SetTimer("close",4000,0);
return 1;
}