Hi,
Wenn einer die Paintball Arena Joint verschwinden die Waffen von der ID 0.
Code:
if(listitem == 0)
{
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid,3.0,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_WHITE, "Du brauchst mindestens Level 3 um die Paintball Arena zu betreten!");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1);
return 1;
}
if(i == 0)
{
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
ResetPlayerWeapons(i);
SendClientMessage(playerid, COLOR_GRAD1, "Paintball betreten. ");
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 34, 100);
SetPlayerArmour(playerid,100);
SetPlayerInterior(playerid, 14);
SetPlayerVirtualWorld(playerid,28);
SetPlayerHealth(playerid,100);
UnFreezePlayer(playerid);
new pname[MAX_PLAYER_NAME],pstring[128];
}
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 bezahlt $%d um das sbiz %d zu betreten", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld", 5000, 1);
}
}
}
}