Abend
Meine Tore gehen nicht mehr auf die Message bekomme ich das es in 10 sec schließt mehr passiert aber nicht.
Hier ein Tor:
if (strcmp("/armygate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10, -1534.55, 482.29, 6.17))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(armygate,-1534.55, 482.29, 6.17-10,5);
SetTimer("CloseArmyGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
public CloseArmyGate()
{
MoveObject(armygate, -1534.55, 482.29, 6.17,10);
return 1;
}
Hier das Komplette OnPlayerCommandText:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/teleoamt", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
new Player[MAX_PLAYER_NAME];
new pVehicle = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, Player, sizeof(Player));
SetVehiclePos(pVehicle,-479.6043,-527.4416,25.2449);
SetPlayerPos(playerid,-479.6043,-527.4416,25.2449);
PutPlayerInVehicle(playerid,pVehicle,0);
SendClientMessage(playerid,0xE1FF00FF,"Du hast dich zum Ordnungsamt teleportiert.");
return 1;
}
if (strcmp("/televagos", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
new Player[MAX_PLAYER_NAME];
new pVehicle = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, Player, sizeof(Player));
SetVehiclePos(pVehicle,2813.1147,-1453.5139,39.7740);
SetPlayerPos(playerid,2813.1147,-1453.5139,39.7740);
PutPlayerInVehicle(playerid,pVehicle,0);
SendClientMessage(playerid,0xE1FF00FF,"Du hast dich zu den Vagos teleportiert.");
return 1;
}
if (strcmp("/teletriaden", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
new Player[MAX_PLAYER_NAME];
new pVehicle = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, Player, sizeof(Player));
SetVehiclePos(pVehicle,1437.3584,744.9273,10.4452);
SetPlayerPos(playerid,1437.3584,744.9273,10.4452);
PutPlayerInVehicle(playerid,pVehicle,0);
SendClientMessage(playerid,0xE1FF00FF,"Du hast dich zu den Triaden teleportiert.");
return 1;
}
if (strcmp("/aheal", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
SetPlayerHealth(playerid,100);
SendClientMessage(playerid,0x0041FFFF,"Du wurdest geheilt!");
return 1;
}
if (strcmp("/gebem4", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
GivePlayerWeapon(playerid,31,500);
SendClientMessage(playerid,0xFF6400FFF,"Du hast eine M4 mit 500 Schuss erhalten.");
return 1;
}
if (strcmp("/gebemp5", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
GivePlayerWeapon(playerid,29,500);
SendClientMessage(playerid,0xFF6400FFF,"Du hast eine Mp5 mit 500 Schuss erhalten.");
return 1;
}
if (strcmp("/gebedeagle", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
GivePlayerWeapon(playerid,24,500);
SendClientMessage(playerid,0xFF6400FFF,"Du hast eine Desert Eagle mit 500 Schuss erhalten.");
return 1;
}
if (strcmp("/armygate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10,-2804.59, -325.76, 6.13))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(armygate,-1534.55, 482.29, 6.17-10,5);
SetTimer("CloseArmyGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/rugate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10,-2804.59, -325.76, 6.13))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(rugate,-2804.59, -325.76, 6.13-10,5);
SetTimer("CloseruGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/rogate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10, -2658.93, -220.29, 3.39))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(rogate,-2658.93, -220.29, 3.39-10,5);
SetTimer("CloseroGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/lgate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10, -2898.73, 67.51, 4.06))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(lgate,-2898.73, 67.51, 4.06-10,5);
SetTimer("CloselGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/rgate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10,-2050.67, -102.17, 34.15))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(rgate,-2050.67, -102.17, 34.15-10,5);
SetTimer("CloserGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/pgate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10,1241.26, -767.17, 91.15))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(pgate,1241.26, -767.17, 91.15-10,5);
SetTimer("ClosepGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/ogate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10,-488.70, -562.95, 24.50))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(ogate,-488.70, -562.95, 24.50-10,5);
SetTimer("CloseoGate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/atgate", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,10,996.90, 1715.33, 9.91))return SendClientMessage(playerid,0xFF6400FF,"Du bist nicht in der Nähe des Tores!");
MoveObject(atgate,996.90, 1715.33, 9.91-10,5);
SetTimer("Closeatgate",10000,0);
SendClientMessage(playerid,0xE1FF00FF,"Das Tor schließt in 10 sec automatisch.");
return 1;
}
if (strcmp("/arep", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
RepairVehicle(vid);
}
SendClientMessage(playerid,0xE1FF00FF,"Du hast das Fahrzeug repariert.");
return 1;
}
if (strcmp("/anitro", cmdtext, true, 10) == 0)
{
new Car;
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
Car=GetPlayerVehicleID(playerid);
AddVehicleComponent(Car,1010);
return 1;
}
if (strcmp("/marker", cmdtext, true, 10) == 0)
{
new Float:x,Float:y,Float:z,pID;
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
GetPlayerPos(pID,x,y,z);
SetPlayerMapIcon(playerid,19,Float:x,Float:y,Float:z,19,0,MAPICON_GLOBAL );
new text[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(text,128,"%s hat den Eventmarker gesetzt.",pName);
SendClientMessageToAll(0xFF0019FF,text);
return 1;
}
if (strcmp("/essen", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5,376.3518,-67.6140,1001.5151))
{
ShowPlayerDialog(playerid,bsnessend,DIALOG_STYLE_LIST,"Essen", "Salat\nHamburger\nChicken Nuggets\nCola\nPommes", "Bestellen", "Abbrechen");
}
if(IsPlayerInRangeOfPoint(playerid,5,376.0945,-67.7535,1001.5151))
{
ShowPlayerDialog(playerid,bsnessend,DIALOG_STYLE_LIST,"Essen", "Salat\nHamburger\nChicken Nuggets\nCola\nPommes", "Bestellen", "Abbrechen");
}
return 1;
}
if(strcmp("/drivein",cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5,1193.6583,-888.0846,43.0647))
{
ShowPlayerDialog(playerid,bsnessend,DIALOG_STYLE_LIST,"Essen", "Salat\nHamburger\nChicken Nuggets\nCola\nPommes", "Bestellen", "Abbrechen");
}
if(IsPlayerInRangeOfPoint(playerid,5,789.4533,-1615.4788,13.3828))
{
ShowPlayerDialog(playerid,bsnessend,DIALOG_STYLE_LIST,"Essen", "Salat\nHamburger\nChicken Nuggets\nCola\nPommes", "Bestellen", "Abbrechen");
}
return 1;
}
if (strcmp("/giveownermoney", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFF0019FF,"Du bist kein Admin!");
GivePlayerMoney(playerid,1000000);
return 1;
}
return 0;
}