Hi, habe n kleines Prob. mit SetTimerEx.
Und zwar will ich folgendes: Nach einem Command sollte man einen überblick über ein Labyrinth haben und den Standort wechseln.
Nun der Command funzt, aber die Position des Spielers wird nicht verändert.
Folgender Code:
//blablabla...
if (strcmp("/labspec", cmdtext, true, 10) == 0)
{
Labctimer1 = SetTimerEx("Labc1", 5000,0, "i", 1, playerid);
Labctimer2 = SetTimerEx("Labc2", 5000,0, "i", 1, playerid);
Labctimer3 = SetTimerEx("Labc3", 5000,0, "i", 1, playerid);
Labctimer4 = SetTimerEx("Labc4", 5000,0, "i", 1, playerid);
Labctimer5 = SetTimerEx("Labc5", 5000,0, "i", 1, playerid);
Labctimer6 = SetTimerEx("Labc6", 5000,0, "i", 1, playerid);
{
Labctimer1 = SetTimerEx("Labc1", 5000,0, "i", 1, playerid);
Labctimer2 = SetTimerEx("Labc2", 5000,0, "i", 1, playerid);
Labctimer3 = SetTimerEx("Labc3", 5000,0, "i", 1, playerid);
Labctimer4 = SetTimerEx("Labc4", 5000,0, "i", 1, playerid);
Labctimer5 = SetTimerEx("Labc5", 5000,0, "i", 1, playerid);
Labctimer6 = SetTimerEx("Labc6", 5000,0, "i", 1, playerid);
SetPlayerPos(playerid, 682.4999,-620.1127,6620.6602);
SetPlayerCameraPos(playerid, 684.1714,-618.7259,6620.6602);
SetPlayerCameraLookAt(playerid, 705.0523,-614.2487,6620.6602);
SetTimer("Labc2", 5000,0);
SendClientMessage(playerid,0x00FF0096, "********Labyrinth Camera*******");
SendClientMessage(playerid,0x00FF0096, "Camera wechselt alle 5 Sekunden");
SendClientMessage(playerid,0x00FF0096, "***Um zu beenden /labspecoff***");
TogglePlayerControllable(playerid, 0);
return 1;
}
SetPlayerCameraPos(playerid, 684.1714,-618.7259,6620.6602);
SetPlayerCameraLookAt(playerid, 705.0523,-614.2487,6620.6602);
SetTimer("Labc2", 5000,0);
SendClientMessage(playerid,0x00FF0096, "********Labyrinth Camera*******");
SendClientMessage(playerid,0x00FF0096, "Camera wechselt alle 5 Sekunden");
SendClientMessage(playerid,0x00FF0096, "***Um zu beenden /labspecoff***");
TogglePlayerControllable(playerid, 0);
return 1;
}
if (strcmp("/labspecoff", cmdtext, true, 10) == 0)
{
KillTimer(Labctimer1);
KillTimer(Labctimer2);
KillTimer(Labctimer3);
KillTimer(Labctimer4);
KillTimer(Labctimer5);
KillTimer(Labctimer6);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
{
KillTimer(Labctimer1);
KillTimer(Labctimer2);
KillTimer(Labctimer3);
KillTimer(Labctimer4);
KillTimer(Labctimer5);
KillTimer(Labctimer6);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
return 0;
}
}
forward Labc2(playerid);
public Labc2(playerid)
{
SetPlayerPos(playerid,733.9786,-607.7220,6620.6812);
SetPlayerCameraPos(playerid,734.6177,-610.1762,6620.6812);
SetPlayerCameraLookAt(playerid,730.4745,-627.7999,6620.6812);
SetTimer("Labctimer3", 5000,0);
return 1;
}
forward Labc3(playerid);
{
SetPlayerPos(playerid,733.9786,-607.7220,6620.6812);
SetPlayerCameraPos(playerid,734.6177,-610.1762,6620.6812);
SetPlayerCameraLookAt(playerid,730.4745,-627.7999,6620.6812);
SetTimer("Labctimer3", 5000,0);
return 1;
}
forward Labc3(playerid);
public Labc3(playerid)
{
SetPlayerPos(playerid,782.5593,-643.0953,6620.6733);
SetPlayerCameraPos(playerid,782.2682,-646.0200,6620.6733);
SetPlayerCameraLookAt(playerid,766.4538,-651.3987,6620.6733);
SetTimer("Labctimer4", 5000,0);
return 1;
}
{
SetPlayerPos(playerid,782.5593,-643.0953,6620.6733);
SetPlayerCameraPos(playerid,782.2682,-646.0200,6620.6733);
SetPlayerCameraLookAt(playerid,766.4538,-651.3987,6620.6733);
SetTimer("Labctimer4", 5000,0);
return 1;
}
forward Labc4(playerid);
public Labc4(playerid)
{
SetPlayerPos(playerid,753.9673,-643.6011,6620.6733);
SetPlayerCameraPos(playerid,753.3797,-643.8091,6620.6733);
SetPlayerCameraLookAt(playerid,734.2720,-652.8528,6620.6851);
SetTimer("Labctimer5", 5000,0);
return 1;
}
forward Labc5(playerid);
public Labc5(playerid)
{
SetPlayerPos(playerid,706.8504,-654.5837,6620.6851);
SetPlayerCameraPos(playerid,705.8654,-656.8694,6620.6851);
SetPlayerCameraLookAt(playerid,684.5294,-670.3024,6620.6313);
SetTimer("Labctimer6", 5000,0);
return 1;
}
forward Labc6(playerid);
public Labc6(playerid)
{
SetPlayerPos(playerid,724.7381,-656.1730,6615.0854);
SetPlayerCameraPos(playerid,724.7381,-656.1730,6655.6851);
SetPlayerCameraLookAt(playerid,724.7381,-656.1730,6615.0854);
SetTimer("Labctimer1", 5000,0);
return 1;
}
forward Labc1(playerid);
public Labc1(playerid)
{
SetPlayerPos(playerid, 682.4999,-620.1127,6620.6602);
SetPlayerCameraPos(playerid, 684.1714,-618.7259,6620.6602);
SetPlayerCameraLookAt(playerid, 705.0523,-614.2487,6620.6602);
SetTimer("Labctimer2", 5000,0);
return 1;
}
public Labc4(playerid)
{
SetPlayerPos(playerid,753.9673,-643.6011,6620.6733);
SetPlayerCameraPos(playerid,753.3797,-643.8091,6620.6733);
SetPlayerCameraLookAt(playerid,734.2720,-652.8528,6620.6851);
SetTimer("Labctimer5", 5000,0);
return 1;
}
forward Labc5(playerid);
public Labc5(playerid)
{
SetPlayerPos(playerid,706.8504,-654.5837,6620.6851);
SetPlayerCameraPos(playerid,705.8654,-656.8694,6620.6851);
SetPlayerCameraLookAt(playerid,684.5294,-670.3024,6620.6313);
SetTimer("Labctimer6", 5000,0);
return 1;
}
forward Labc6(playerid);
public Labc6(playerid)
{
SetPlayerPos(playerid,724.7381,-656.1730,6615.0854);
SetPlayerCameraPos(playerid,724.7381,-656.1730,6655.6851);
SetPlayerCameraLookAt(playerid,724.7381,-656.1730,6615.0854);
SetTimer("Labctimer1", 5000,0);
return 1;
}
forward Labc1(playerid);
public Labc1(playerid)
{
SetPlayerPos(playerid, 682.4999,-620.1127,6620.6602);
SetPlayerCameraPos(playerid, 684.1714,-618.7259,6620.6602);
SetPlayerCameraLookAt(playerid, 705.0523,-614.2487,6620.6602);
SetTimer("Labctimer2", 5000,0);
return 1;
}
Keine Warnings/Errors