Hallo, liebe leser und leserinnen.
Ich habe ein problem mit meiner schranke.
Sie geht einfach nicht auf, obwohl die nötigen funktionen aufgerufen werden (habs mit print rausbekommen)...
Könnt ihr mir sagen was der problem ist. Codes hier:
schranke[0] = CreateObjectToStream(968, 51.557659, -1542.221558, 5.044630, 0.000000, -91.10023213, -96.0933874272); //
schranke[1] = CreateObjectToStream(968, 53.985050, -1521.043579, 5.005527, 0.000000, 91.1002894258, -95.1566014322); //
forward ResetSchrankeStatus();
public ResetSchrankeStatus(playerid)
{
if(pHasGivenMaut[playerid] == 1)
{
if(schrankestatus[0] == 1)
{
SetObjectRot(schranke[0],0.000000,-91.10023213,-96.0933874272);
schrankestatus[0] = 0;
}
if(schrankestatus[1] == 1)
{
SetObjectRot(schranke[1],0.000000,91.1002894258,-95.1566014322);
schrankestatus[1] = 0;
}
pHasGivenMaut[playerid] = 0;
return 1;
}
return 1;
}
das ist unter einem callback der jede 2 sek aufgerufen werden. Nutze ich für ports und automatische gates
new pHasGivenMaut[MAX_PLAYERS];
new schrankestatus[2];
if(IsPlayerInRangeOfPoint(playerid,2.0,51.557659,-1542.221558,5.044630))
{
if(PlayerInfo[playerid][pSFLic] == 1)
{
if(pHasGivenMaut[playerid] == 0)
{
GivePlayerMoney(playerid,-500);
pHasGivenMaut[playerid] = 1;
SetObjectRot(schranke[0],0.000000,-44.6906507244,-96.0933874272);
schrankestatus[0] = 1;
format(string,sizeof(string),"~r~-$500");
GameTextForPlayer(playerid,string,2500,1);
SetTimerEx("ResetSchrankeStatus",5000,0,"id",playerid,schrankestatus[0]);
return 1;
}
}
else
{
if(pHasGivenMaut[playerid] == 0)
{
GivePlayerMoney(playerid,-500);
pHasGivenMaut[playerid] = 1;
SetObjectRot(schranke[0],0.000000,-44.6906507244,-96.0933874272);
schrankestatus[0] = 1;
format(string,sizeof(string),"~r~-$500");
GameTextForPlayer(playerid,string,2500,1);
SetTimerEx("ResetSchrankeStatus",4000,0,"id",playerid,schrankestatus[0]);
return 1;
}
}
}
if(IsPlayerInRangeOfPoint(playerid,2.0,53.985050,-1521.043579,5.005527))
{
if(PlayerInfo[playerid][pSFLic] == 1)
{
if(pHasGivenMaut[playerid] == 0)
{
pHasGivenMaut[playerid] = 1;
GivePlayerMoney(playerid,-500);
SetObjectRot(schranke[1],0.000000,0.000000,-96.0160381249);
schrankestatus[1] = 1;
format(string,sizeof(string),"~r~-$500");
GameTextForPlayer(playerid,string,2500,1);
SetTimerEx("ResetSchrankeStatus",4000,0,"id",playerid,schrankestatus[1]);
return 1;
}
}
else
{
if(pHasGivenMaut[playerid] == 0)
{
GivePlayerMoney(playerid,-500);
pHasGivenMaut[playerid] = 1;
SetObjectRot(schranke[1],0.000000,0.000000,-96.0160381249);
schrankestatus[1] = 1;
format(string,sizeof(string),"~r~-$500");
GameTextForPlayer(playerid,string,2500,1);
SetTimerEx("ResetSchrankeStatus",4000,0,"id",playerid,schrankestatus[1]);
return 1;
}
}
}
pls help