ganz oben:
//gates
new LVPDGate[1],LVPDGateH[1],SWATGate[2];
Unter OnGameModeInit:
LVPDGate[0] = CreateObject(971,2335.15014648,2444.10009766,7.17587233,0.00000000,0.00000000,60.00000000); //object(subwaygate) (1)
LVPDGateH[0] = CreateObject(971,2293.88623047,2499.27758789,5.74178362,0.00000000,0.00000000,270.00000000); //object(subwaygate) (3)
SWATGate[0] = CreateObject(988,2251.19140625,2500.58471680,3.21131253,0.00000000,0.00000000,270.00000000); //object(ws_apgate) (1)
SWATGate[1] = CreateObject(988,2251.19140625,2495.16357422,3.21131253,0.00000000,0.00000000,270.00000000); //object(ws_apgate) (2)
unter OnPlayerCommandText:
if(strcmp("auf", cmdtext, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2335.15014648,2444.10009766,7.17587233))
{
if(Fraktion(playerid,1)||Fraktion(playerid,2))
{
MoveObject(LVPDGate[0],2335.14941406,2444.09960938,0.20571980,4);
SendClientMessage(playerid,BLAU,"Tor zur LVPD-Garage geöffnet");
SetTimer("LVPDGatezuruck", 8000, false);
return true;
}
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2293.88623047,2499.27758789,5.74178362))
{
if(Fraktion(playerid,1)||Fraktion(playerid,2))
{
MoveObject(LVPDGateH[0],2293.88574219,2499.27734375,11.05909061,4);
SendClientMessage(playerid,BLAU,"Hintertor zur LVPD-Garage geöffnet");
SetTimer("LVPDGateHzuruck", 8000, false);
return true;
}
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2251.19140625,2497.87414551,3.21131253))
{
if(Fraktion(playerid,2))
{
MoveObject(SWATGate[0],2251.19140625,2506.16308594,3.21131253,4);
MoveObject(SWATGate[1],2251.19140625,2511.58398438,3.21131253,4);
SendClientMessage(playerid,BLAU,"Tor zur SWAT-Garage geöffnet");
SetTimer("SWATGatezuruck", 8000, false);
return true;
}
}
und dann i-wo unten:
forward LVPDGatezuruck();
public LVPDGatezuruck()
{
MoveObject(LVPDGate[0],2335.15014648,2444.10009766,7.17587233, 4);
return true;
}
forward LVPDGateHzuruck();
public LVPDGateHzuruck()
{
MoveObject(LVPDGateH[0],2293.88623047,2499.27758789,5.74178362, 4);
return true;
}
forward SWATGatezuruck();
public SWATGatezuruck()
{
MoveObject(SWATGate[0],2251.19140625,2500.58471680,3.21131253, 4);
MoveObject(SWATGate[1],2251.19140625,2495.16357422,3.21131253, 4);
return true;
}
Egal ob ich Fraktion 1 oder Fraktion 2 bin... es passiert bei /auf nix... keine nachricht, keine bewegung, bitte um Hilfe...
ps: hab es auch schon mit else if(IsPlayerInRangeOfPoint... versucht...
bitte um schnelle hilfe
//e
ohhgott bin ich blöd..
bei [pwn]if(strcmp("auf", cmdtext, true) == 0)
/ vergessen...