26.05.2011, 20:54
There's no much code,is just that...
In the gamemode:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(GetPVarInt(playerid, "logged") == 1) return SendClientMessage(playerid, 0xFFFF00, "TEST OK.");
return 1;
}
In the filterscipt:
public OnPlayerSpawn(playerid)
{
//---------------------------ANTI CHEAT-----------------------------------------
Timer4[playerid] = SetTimer("Jetpack",1000,1);
Timer[playerid] = SetTimerEx("CheckPing",3000,1,"i",playerid);
Timer2[playerid] = SetTimerEx("CheckMG",1000,1,"i",playerid);
SetPVarInt(playerid, "logged", 1);
return 1;
}
Is just a test. When you spawn the filterscript sets the pvar to one and when you try any command the gamemode will respond "TEST OK"
In the gamemode:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(GetPVarInt(playerid, "logged") == 1) return SendClientMessage(playerid, 0xFFFF00, "TEST OK.");
return 1;
}
In the filterscipt:
public OnPlayerSpawn(playerid)
{
//---------------------------ANTI CHEAT-----------------------------------------
Timer4[playerid] = SetTimer("Jetpack",1000,1);
Timer[playerid] = SetTimerEx("CheckPing",3000,1,"i",playerid);
Timer2[playerid] = SetTimerEx("CheckMG",1000,1,"i",playerid);
SetPVarInt(playerid, "logged", 1);
return 1;
}
Is just a test. When you spawn the filterscript sets the pvar to one and when you try any command the gamemode will respond "TEST OK"

