Hey wollte es so machen das egal wo man steht bspw. Stadthalle oder Grove Street das wenn der Spieler nicht in der Grove Street ist die Grove Street Base nicht beitreten kann etc:
Enter/Exit Befehl sieht bei mir so aus:
Enter klappt an sich
Code
ocmd:enter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1554.0204,-1675.5763,16.1953))
{
SetPlayerPos(playerid, 246.4727,109.0606,1003.2188);
SetPlayerInterior(playerid, 10);
SetPlayerVirtualWorld(playerid, 1);
SCM(playerid, COLOR_GREEN, "Du hast das San Andreas Police Department betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 919.4661,-1252.1768,16.2109))
{
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 322.197998,302.497985,999.148437);
SetPlayerVirtualWorld(playerid, 1);
SCM(playerid, COLOR_GREEN, "Du hast das San Andreas Ordnungsamt betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, -2520.9719,-624.1928,132.7820))
{
if(!isPlayerInFraktion(playerid, 4))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur San Andreas News!");
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
SCM(playerid, COLOR_GREEN, "Du hast die San Andreas News Base betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 300.0994,-1154.3063,81.3910))
{
if(!isPlayerInFraktion(playerid, 5))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur La Cosa Nostra!");
SetPlayerInterior(playerid, 12);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, 2324.419921,-1145.568359,1050.710083);
SCM(playerid, COLOR_GREEN, "Du hast die La Cosa Nostra Base betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2632.7715,1824.2556,11.0234))
{
if(!isPlayerInFraktion(playerid, 6))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur Yakuza!");
if(IsPlayerVirtualWorld(
SetPlayerInterior(playerid, 12);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerPos(playerid, 2324.419921,-1145.568359,1050.710083);
SCM(playerid, COLOR_GREEN, "[INFO]: Du hast die Yakuza Base betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, -2720.3311,-317.9410,7.8438))
{
if(!isPlayerInFraktion(playerid, 7))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zu den Triaden!");
if(!IsPlayerInRangeOfPoint(playerid, 5, -2720.3311,-317.9410,7.8438)) return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du bist nicht an der Fraktionsbasis!");
SetPlayerInterior(playerid, 12);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerPos(playerid, 2324.419921,-1145.568359,1050.710083);
SCM(playerid, COLOR_GREEN,"[INFO]: Du hast die Triaden Base betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 1921.5929,-1115.0518,27.0883))
{
if(!isPlayerInFraktion(playerid, 8))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zu den Rollin´ Heights Ballas!");
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, 2496.049804,-1695.238159,1014.742187);
SCM(playerid, COLOR_GREEN,"[INFO]: Du hast die Rollin´ Heights Ballas Base betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid,5,2495.3770,-1690.7618,14.7656))
{
if(!isPlayerInFraktion(playerid, 9))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur Grove Street Family!");
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerPos(playerid, 2496.049804,-1695.238159,1014.742187);
SCM(playerid, COLOR_GREEN,"[INFO]: Du hast die GSF Base betreten!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5,2534.1455,-1063.2891,69.5656))
{
if(!isPlayerInFraktion(playerid, 10))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zu den Los Santos Vagos!");
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerPos(playerid, 2496.049804,-1695.238159,1014.742187);
SCM(playerid, COLOR_GREEN,"[INFO]: Du hast die Los Santos Vagos Base betreten!");
}
else SCM(playerid, COLOR_DARKRED, "[ERROR]: Du bist nicht an deiner Fraktionsbasis!");
return 1;
}
ocmd:exit(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 246.4727,109.0606,1003.2188))
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1554.0204,-1675.5763,16.1953);
SCM(playerid,COLOR_DARKRED,"Du hast das San Andreas Police Department verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 322.197998,302.497985,999.148437))
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 919.4661,-1252.1768,16.2109);
SCM(playerid,COLOR_DARKRED,"Du hast das San Andreas Ordnungsamt verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 384.808624,173.804992,1008.382812))
{
if(!isPlayerInFraktion(playerid, 4))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur San Andreas News!");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, -2520.9802,-620.8670,132.7227);
SCM(playerid, COLOR_DARKRED,"[INFO]: Du hast die San Andreas News Base verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2324.419921,-1145.568359,1050.710083))
{
if(!isPlayerInFraktion(playerid, 5))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur La Cosa Nostra!");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 298.6081,-1155.7162,80.9099);
SCM(playerid, COLOR_DARKRED,"[INFO]: Du hast die La Cosa Nostra Base verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2324.419921,-1145.568359,1050.710083))
{
if(!isPlayerInFraktion(playerid, 6))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur Yakuza!");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 2629.4731,1824.5076,11.0234);
SCM(playerid, COLOR_DARKRED,"[INFO]: Du hast die Yakuza Base verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2324.2241,-1148.1514,1050.7101))
{
if(!isPlayerInFraktion(playerid, 7))return SCM(playerid, COLOR_DARKRED,"[ERROR]: Du gehörst nicht zu den Triaden!");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, -2722.4209,-315.4411,7.1875);
SCM(playerid, COLOR_DARKRED,"[INFO]: Du hast die Triaden Base verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2496.0222,-1693.7847,1014.7422))
{
if(!isPlayerInFraktion(playerid, 8))return SCM(playerid,COLOR_DARKRED,"[ERROR]: Du gehörst nicht zu den Rollin´ Heights Ballas!");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1922.2152,-1118.3474,26.0859);
SCM(playerid,COLOR_DARKRED,"[INFO]: Du hast die Rollin´ Heights Ballas Base verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2496.0222,-1693.7847,1014.7422))
{
if(!isPlayerInFraktion(playerid, 9))return SCM(playerid,COLOR_DARKRED,"[ERROR]: Du gehörst nicht zur Grove Street Family!");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 2495.2893,-1686.9703,13.5149);
SCM(playerid,COLOR_DARKRED,"[INFO]: Du hast die GSF Base verlassen!");
}
else if(IsPlayerInRangeOfPoint(playerid, 5, 2496.0222,-1693.7847,1014.7422))
{
if(!isPlayerInFraktion(playerid, 10))return SCM(playerid,COLOR_DARKRED,"[ERROR]: Du gehörst nicht zu den Los Santos Vagos!");
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 2533.9868,-1058.9501,69.5698);
SCM(playerid,COLOR_DARKRED,"[INFO]: Du hast die Los Santos Vagos Base verlassen!");
}
else SCM(playerid, COLOR_DARKRED, "[ERROR]: Du kannst die Base hier nicht verlassen!");
return 1;
}
Alles anzeigen