Kann mir jemand seinen /enter und /exit Befehl posten.
Ich habe meinen irgendwie verspielt und jetzt Funktioniert Garnichts mehr
MfG florian941
Kann mir jemand seinen /enter und /exit Befehl posten.
Ich habe meinen irgendwie verspielt und jetzt Funktioniert Garnichts mehr
MfG florian941
Godfather hier bitte:
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!IsACop(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, " Cops only !");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~ausverkauft", 5000, 1);
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~ausverkauft", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "You can now parcipitate in a Karting Race, grab a Kart.");
}
else
{
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s payed $%d to enter sbiz %d", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,1483.830322, -1768.207153, 18.456133))
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
GameTextForPlayer(playerid, "~w~Willkommen im Regierungshaus", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 241;
}
else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Willkommen zum 8ball Rennen", 5000, 1);
SetPlayerInterior(playerid,7);
PlayerInfo[playerid][pInt] = 7;
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(3.0, playerid,2703.5103,-1699.6544,11.8438))
{
GameTextForPlayer(playerid, "~w~Willkommen zum Death Race", 5000, 1);
SetPlayerInterior(playerid,15);
PlayerInfo[playerid][pInt] = 15;
SetPlayerPos(playerid,-1398.103515,937.631164,1036.479125);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zum Dirt Rennen", 5000, 1);
SetPlayerInterior(playerid,4);
PlayerInfo[playerid][pInt] = 4;
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen in der Standarena", 5000, 1);
SetPlayerInterior(playerid,14);
PlayerInfo[playerid][pInt] = 14;
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
else if (PlayerToPoint(8.0, playerid,-2764.8911,375.6259,6.3426))
{
GameTextForPlayer(playerid, "~w~Willkommen in der Bank", 5000, 1);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 1);
Free[playerid] = 1;
PlayerInfo[playerid][pLocal] = 103;
SetPlayerPos(playerid,2305.6890,-16.0881,26.7496);
}
else if (PlayerToPoint(8.0, playerid,-1112.3635,-1674.0742,76.4185))
{
GameTextForPlayer(playerid, "~w~Willkommen im Hitman-Versteck", 5000, 1);
SetPlayerInterior(playerid,6);
PlayerInfo[playerid][pInt] = 6;
PlayerInfo[playerid][pLocal] = 200;
SetPlayerPos(playerid,296.3997,-107.0163,1001.5156);
}
else if (PlayerToPoint(8.0, playerid,718.3216,-1477.2084,5.4688))
{
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || IsACSI(playerid))
{
GameTextForPlayer(playerid, "~w~LCN Versteck", 5000, 1);
SetPlayerInterior(playerid,9);
PlayerInfo[playerid][pInt] = 9;
SetPlayerPos(playerid,2320.3208,-1024.9601,1050.2109);
}
}
else if (PlayerToPoint(8.0, playerid,1517.6851,-1505.2056,13.5547))
{
if (PlayerInfo[playerid][pMember] == 16|| PlayerInfo[playerid][pLeader] == 16 || IsACSI(playerid))
{
GameTextForPlayer(playerid, "~w~Red Soldiers base", 5000, 1);
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
SetPlayerPos(playerid,-778.4498,495.8393,1368.5304);
}
}
else if (PlayerToPoint(8.0, playerid,1568.6952,-1690.4670,5.8906))
{
if(IsACop(playerid))
{
GameTextForPlayer(playerid, "~w~PD", 5000, 1);
SetPlayerInterior(playerid,3);
PlayerInfo[playerid][pInt] = 3;
SetPlayerPos(playerid,238.6003,141.2120,1003.0234);
}
}
else if (PlayerToPoint(8.0, playerid,1654.0626,-1656.7372,22.5156))
{
if(IsPlayerConnected(playerid))
{
GameTextForPlayer(playerid, "~w~CSI base", 5000, 1);
SetPlayerInterior(playerid,10);
PlayerInfo[playerid][pInt] = 10;
SetPlayerPos(playerid,246.3760,109.2460,1003.2188);
}
}
else if (PlayerToPoint(8.0, playerid,1123.7449,-2037.3063,69.8860))
{
if (PlayerInfo[playerid][pMember] == 7||13|| PlayerInfo[playerid][pLeader] == 7||13)
{
GameTextForPlayer(playerid, "~w~Pentagon", 5000, 1);
SetPlayerInterior(playerid,5);
PlayerInfo[playerid][pInt] = 5;
SetPlayerPos(playerid,1266.5160,-782.4367,1091.9063);
}
}
else if (PlayerToPoint(8.0, playerid,300.4126,-1154.6367,81.3859))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
GameTextForPlayer(playerid, "~w~Admin-Haus", 5000, 1);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2257.454102, -1740.186646, -79.167427);
}
}
else if (PlayerToPoint(8.0, playerid,233.3118,1841.9834,17.6406))
{
if (PlayerInfo[playerid][pMember] == 3|| PlayerInfo[playerid][pLeader] == 3)
{
GameTextForPlayer(playerid, "~w~Army Haus", 5000, 1);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-92.836731, 6273.952637, 9.286758);
}
}
else if (PlayerToPoint(8.0, playerid,1455.5206,750.7079,11.0234))
{
if (PlayerInfo[playerid][pMember] == 20|| PlayerInfo[playerid][pLeader] == 20 || IsACSI(playerid))
{
GameTextForPlayer(playerid, "~w~BOD Versteck", 5000, 1);
SetPlayerInterior(playerid,8);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2365.1897,-1132.2941,1050.8750);
}
}
}
return 1;
}
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
//printf("House :%d",i);
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
//printf("Bizz :%d",i);
if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
PlayerInfo[playerid][pLocal] = 255;
}
}
if(GetPlayerVehicleID(playerid) >= 71 && GetPlayerVehicleID(playerid) <= 77 || GetPlayerVehicleID(playerid) >= 179 && GetPlayerVehicleID(playerid) <= 190)
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1483.830322, -1768.207153, 18.456133);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if (Free[playerid] == 1) //bank
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2764.8911,375.6259,6.3426);
PlayerInfo[playerid][pInt] = 0;
Free[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pLocal] = 255;
}
else if (PlayerToPoint(3.0, playerid,296.3997,-107.0163,1001.5156))//hitman
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1112.3635,-1674.0742,76.4185);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if (PlayerToPoint(8.0, playerid,-1398.103515,937.631164,1036.479125))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2703.5103,-1699.6544,11.8438);
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
else if (PlayerToPoint(8.0, playerid,1176.9448, -1316.6666, -6.9708))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,1173.0244,-1326.1515,15.3974);
}
else if (PlayerToPoint(8.0, playerid,2320.3208,-1024.9601,1050.2109))
{
if (PlayerInfo[playerid][pMember] == 5|| PlayerInfo[playerid][pLeader] == 5)
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,718.3216,-1477.2084,5.4688);
}
}
else if (PlayerToPoint(8.0, playerid,-778.4498,495.8393,1368.5304))
{
if (PlayerInfo[playerid][pMember] == 16|| PlayerInfo[playerid][pLeader] == 16)
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,1517.6851,-1505.2056,13.5547);
}
}
else if (PlayerToPoint(8.0, playerid,238.6003,141.2120,1003.0234))
{
if(IsACop(playerid))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,1568.6952,-1690.4670,5.8906);
}
}
else if (PlayerToPoint(8.0, playerid,246.3760,109.2460,1003.2188))
{
if (PlayerInfo[playerid][pMember] == 14|| PlayerInfo[playerid][pLeader] == 14)
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,1654.0626,-1656.7372,22.5156);
}
}
else if (PlayerToPoint(8.0, playerid,1263.8958,-784.6381,1091.9063))
{
if (PlayerInfo[playerid][pMember] == 7||13|| PlayerInfo[playerid][pLeader] == 7||13)
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,1123.7449,-2037.3063,69.8860);
}
}
else if (PlayerToPoint(8.0, playerid,2257.454102, -1740.186646, -79.167427))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,300.4126,-1154.6367,81.3859);
}
}
else if (PlayerToPoint(8.0, playerid,-92.836731, 6273.952637, 9.286758))
{
if (PlayerInfo[playerid][pMember] == 3|| PlayerInfo[playerid][pLeader] == 3)
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,233.3118,1841.9834,17.6406);
}
}
else if (PlayerToPoint(8.0, playerid,2389.0903,2678.9663,-2.2134))
{
if (PlayerInfo[playerid][pJailed] == 0)
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,1583.5963,-1678.2257,5.8967);
}
}
else if (PlayerToPoint(8.0, playerid,2365.1897,-1132.2941,1050.8750))
{
if (PlayerInfo[playerid][pMember] == 20|| PlayerInfo[playerid][pLeader] == 20 || IsACSI(playerid))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,1455.5206,750.7079,11.0234);
}
}
else if(NoFuel[playerid] == 1)
{
TogglePlayerControllable(playerid, 1);
NoFuel[playerid] = 0;
}
}
return 1;
}