30.07.2010, 11:01
How can i make that when someone goes against this door
they teleport to another place?
they teleport to another place?
forward DoorCheck(playerid);
public DoorCheck(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, doorx, doory, doorz, 1)
{
SetPlayerPos(playerid, yourx, youry, yourz);
SetPlayerFacingAngle(playerid, facingangle); // Remove if not needed :)
}
}
SetTimerEx("DoorCheck(playerid)", 3000, true, "i", playerid);
// TOP
forward DoorCheck();
// ANYWHERE
public DoorCheck()
{
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerInRangeOfPoint(i, doorx, doory, doorz, 1)
{
SetPlayerPos(i, yourx, youry, yourz);
SetPlayerFacingAngle(i, facingangle); // Remove if not needed :)
}
}
}
// ONGAMEMODEINIT
SetTimer("DoorCheck",2000,1);