Posts: 220
Threads: 41
Joined: Jun 2007
Reputation:
0
Hi.
Im setting a Pvar inside a filterscript like this:
SetPVarInt(playerid, "logged", 1);
Then I'm trying to retrieve it from the gamemode:
if(GetPVarInt(playerid, "logged") == 1)
Well, that's not working...
But is curious because i copy the exact same code and paste it inside the gamemode and it works.
Any suggestions?
Posts: 944
Threads: 77
Joined: Dec 2010
Reputation:
0
We cannot help you without the code.
Posts: 220
Threads: 41
Joined: Jun 2007
Reputation:
0
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"
Posts: 220
Threads: 41
Joined: Jun 2007
Reputation:
0
It's weird... I think it was the server. It work after i shut it and restart. It's weird because the first time i tried that but it didn't work. It was driving me mad!!