SA-MP Forums Archive
Help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help! (/showthread.php?tid=619081)



Help! - StrikerZ - 13.10.2016

Whenever i add any filterscript in my gamemode my gamemode stops responding to selectable textdraws and spawn info


Re: Help! - Gotham - 13.10.2016

the filter script may be blocking it?I don't really know.


Re: Help! - StrikerZ - 13.10.2016

Here is the filterscript short and simple one im using

http://pastebin.com/rwXN7r7J


Re: Help! - Gotham - 13.10.2016

Umm... I don't know what the problem is now,Show the TextDraw codes..


Re: Help! - StrikerZ - 14.10.2016

Bump!


Re: Help! - Tass007 - 14.10.2016

The reason is because that filterscript is acting as a gamemode.
Take out
Код:
#else
main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}
 
#endif
and
Код:
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;
}



Re: Help! - StrikerZ - 14.10.2016

didn't worked


Re: Help! - TheDrx - 14.10.2016

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.");
}