15.10.2014, 16:30
Quote:
Isso nгo vai funcionar desse jeito...
Experimente ligar o timer na OnPlayerSpawn e armazene a posiзгo do player nas variбveis apуs a verificaзгo. Lembrando que vc deve criar uma stock que armazene acima de tudo a posiзгo atual do player e fazer a funзгo do teleporte. Ex: pawn Код:
PS: Acabei de fazer e funcionou. Se tiver dъvidas, basta perguntar =) |
Onplayerconnect:
pawn Код:
SetTimerEx("antitp",5000,true,"d",playerid);
saiuinterior[playerid] = 0;
pawn Код:
public antitp(playerid)
{
if(GetPlayerInterior(playerid) != 0)
{
saiuinterior[playerid] = 1;
}else{
saiuinterior[playerid] = 0;
}
GetPlayerPos(playerid,posxantes,posyantes,poszantes);
SetTimerEx("antitp2",3000,true,"d",playerid);
return 1;
}
public antitp2(playerid)
{
if(!IsPlayerInRangeOfPoint(playerid, 80.0,posxantes,posyantes,poszantes ))
{
if(GetPlayerInterior(playerid) == 0 && saiuinterior[playerid] == 0)
{
new string[200];
SendClientMessage(playerid,-1,"tp detectado");
return 1;
}
}
}