22.10.2009, 05:56
ok i have a npc i made i added the
to the login...
the issue i am having is that my idle timer to keep inactive players from getting score and playing time has a auto kick and its causing the npc to stay at the spawn ...
Idle Timer Code
now before you say add the
i have tried this and returned the other value but i am getting the error saying
any will be appreciated
thanks blabla93
Код:
if(IsPlayerNPC(playerid)) return 1;
the issue i am having is that my idle timer to keep inactive players from getting score and playing time has a auto kick and its causing the npc to stay at the spawn ...
Idle Timer Code
Код:
public IdleTimer()
{
new pName[MAX_PLAYER_NAME], string[256];
new Float:X, Float:Y, Float:Z;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pSettings[i][IdleStatus] == 0)
{
if(pSettings[i][FirstCheck]==0)
{
GetPlayerPos(i, IdlePos[i][0], IdlePos[i][1], IdlePos[i][2]);
pSettings[i][FirstCheck]=1;
}
else
{
GetPlayerPos(i, X, Y, Z);
if(X == IdlePos[i][0] && Y == IdlePos[i][1] && Z == IdlePos[i][2])
{
if(pSettings[i][IdleTime] < 60)
{
pSettings[i][IdleTime]++;
}
else
{
pSettings[i][IdleStatus] = 1;
SendClientMessage(i, COLOR_SKYBLUE, "- Your Status Has Changed. (Away)");
pSettings[i][IdleTime]=0;
pSettings[i][FirstCheck]=0;
}
}
else
{
pSettings[i][FirstCheck]=0;
pSettings[i][IdleTime]=0;
}
}
}
else
{
GetPlayerPos(i, X, Y, Z);
if(X != IdlePos[i][0] && Y != IdlePos[i][1])
{
SendClientMessage(i, COLOR_SKYBLUE, "- Your Status Has Changed. (Active)");
pSettings[i][IdleStatus]=0;
pSettings[i][IdleTime]=0;
}
else
{
if(pSettings[i][IdleTime] < 1200)
{
pSettings[i][IdleTime]++;
}
else
{
GetPlayerName(i,pName,sizeof(pName));
format(string,sizeof(string),"SERVER: %s (%d) Has Been Away For More Then 20 Minutes And Was Kicked.",pName,i);
SendClientMessageToAll(COLOR_SKYBLUE, string);
Kick(i);
}
}
}
}
}
}
Код:
if(IsPlayerNPC(playerid)) return 1;
Код:
C:\Documents and Settings\Desktop\SAMP\gamemodes\SuperStunt.pwn(5119) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
thanks blabla93

