08.04.2013, 09:37
I have made this situation to happen when somebody approaches Fallout's admincastle. The player's velocity to be multiplicated by 0.2 each 0.1 second. But the SetPlayerVelocity has no effect. Although, the message "muahaha..." appears i dont get like stuck. What's wrong?
I made RemovePlayerFromVehicle(i); comment cause I wanted to see if the effect takes place while plaryer on nrg but still nothing.
EDIT: I tested it again and the AntiWalkTimer doesnt work at all, neither the message muahaha appears.
pawn Код:
public ACareachecker()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new intruder[MAX_PLAYER_NAME], file[200], Float:X, Float:Y, Float:Z;
GetPlayerName(i, intruder, sizeof(intruder));
GetPlayerPos(i, X, Y, Z);
format(file, sizeof(file), "\\users\\%s.ini", intruder);
if (X>-3748.2446 && Y>-325.8979 && X<-3172.2207 && Y<170.7440 && (dini_Int(file, "AdminLevel")==0 || !dini_Exists(file)))
{
// RemovePlayerFromVehicle(i);
if (istoAC[i]==false)
{
GameTextForPlayer(i, "~w~you were warned", 3000, 3);
actimer=SetTimerEx("AntiWalkTimer", 100, 1, "d", i);
istoAC[i]=true;
}
}
else
{
istoAC[i]=false;
KillTimer(actimer);
}
}
}
return 1;
}
public AntiWalkTimer(i)
{
new Float:Velocity[3];
GetPlayerVelocity(i, Velocity[0], Velocity[1], Velocity[2]);
SetPlayerVelocity(i, 0.2*Velocity[0], 0.2*Velocity[1],0.3*Velocity[2]);
GameTextForPlayer(i, "~w~MUAHAHAHAHA - ~r~ANTIWALK ACTIVATED!", 4000, 3);
return 1;
}
EDIT: I tested it again and the AntiWalkTimer doesnt work at all, neither the message muahaha appears.