Help!
#8

All this code has to be adapted in your gamemode.

Quote:

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_YES)
{
for(new i = 0; i <= MAX_GATES; i++)
{
if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[i][gPosx], GateInfo[i][gPosy], GateInfo[i][gPosz] ) )

{
if(GateInfo[i][gClosed] == 1)
{
MoveObject(GateInfo[i][gModel],GateInfo[i][gPosx], GateInfo[i][gPosy], GateInfo[i][gPosz]-7,3.5);
GameTextForPlayer(playerid,"~g~Opening gate",1000,3);
GateInfo[i][gOpened] =1;
GateInfo[i][gClosed] =0;
}
else if(GateInfo[i][gOpened] == 1)
{
MoveObject(GateInfo[i][gModel],GateInfo[i][gPosx], GateInfo[i][gPosy], GateInfo[i][gPosz],3.5);
GameTextForPlayer(playerid,"~r~Closing gate",1000,3);
GateInfo[i][gClosed] =1;
GateInfo[i][gOpened] =0;
}
}
}
}
return 1;
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
if(success)
{
SetTimer("rcon",300,false);
}
return 1;
}
forward rcon(playerid);
public rcon(playerid)
{
SendClientMessage(playerid,-1,"»{FFCC00}Gate rcon {FFFFFF}-Gate system has detected your rcon login , use {FFCC00}/gate {FFFFFF}- {FFCC00}/gateinfo.");
}

Reply


Messages In This Thread
Help! - by StrikerZ - 13.10.2016, 14:06
Re: Help! - by Gotham - 13.10.2016, 14:14
Re: Help! - by StrikerZ - 13.10.2016, 14:23
Re: Help! - by Gotham - 13.10.2016, 14:47
Re: Help! - by StrikerZ - 14.10.2016, 10:25
Re: Help! - by Tass007 - 14.10.2016, 10:43
Re: Help! - by StrikerZ - 14.10.2016, 11:02
Re: Help! - by TheDrx - 14.10.2016, 11:06

Forum Jump:


Users browsing this thread: 1 Guest(s)