not teleporting - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: not teleporting (
/showthread.php?tid=277798)
not teleporting -
jaksimaksi - 19.08.2011
pawn Код:
for(new d = 0; d < sizeof(HousesInfo); d++)
{
format(housefile,sizeof(housefile),"Houses/%i.ini",d);
if (PlayerToPoint(2.0, playerid,HousesInfo[d][hExitx],HousesInfo[d][hExity],HousesInfo[d][hExitz]))
{
if(dini_Int(housefile, "Lock") == 1)
{
SendClientMessage(playerid, COLOR_GREY, "door locked");
return 1;
}
pTeleporting[playerid]=LOC_NAMAS_INT;
SetTimer("fading", 5000, false);
FadePlayerScreenToColor(playerid, 0x000000FF, 7);
TogglePlayerControllable(playerid,0);
pawn Код:
public fading(playerid)
{
switch(pTeleporting[playerid])
{
case LOC_NAMAS_INT:
{
for(new d = 0; d < sizeof(HousesInfo); d++)
{
format(housefile,sizeof(housefile),"Houses/%i.ini",d);
SetPlayerPos(playerid,HousesInfo[d][hEntrancex],HousesInfo[d][hEntrancey],HousesInfo[d][hEntrancez]);
FadePlayerScreen(playerid,0x000000FF, 7);
SetPlayerFacingAngle(playerid, dini_Float(housefile, "ExitAngle"));
SetPlayerInterior(playerid, dini_Int(housefile, "Interior"));
TogglePlayerControllable(playerid,1);
pTeleporting[playerid]=INVALID_DESTINATION;
}
}
I use seifs fade inc, when i type /enter timer starts but teleporting me to nowhere where is the problem!?!??!