Ah sry.. Du hast ja ein GF Nagut hoffe du kannst den Anweisungen folgen..
public OnPlayerConnect(playerid)
{
SetPVarInt(playerid, "IstInArena", 0);
return 1;
}
public OnPlayerDisconnect(playerid)
{
RemovePVar(playerid, "IstInArena");
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == arenaenter1)
{
SetPVarInt(playerid, "IstInArena", 1);
//Der andere restliche Code,
//also einfach nur den Code einfügen ober dieser Zeile ^^
return 1;
}
return 1;
}
public SetPlayerSpawn(playerid)
{
//Diese Abfrage so weit wie möglich nach oben!
if(GetPVarInt(playerid, "IstInArena") == 1)
{
SetPlayerPos(playerid,2722.9504, 2126.5295, -1.1362);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
GivePlayerWeapon(playerid,24,99999);
GivePlayerWeapon(playerid,31,99999);
GivePlayerWeapon(playerid,33,99999);
GivePlayerWeapon(playerid,18,99999);
GivePlayerWeapon(playerid,16,99999);
GivePlayerWeapon(playerid,42,99999);
return 1; //Gaaanz Wichtig ^^
}
//Restlicher Code...
return 1;
}
Was besonders wichtig ist, dass wenn der Spieler die Arena verlässt du folgende Zeile dorthin schreibst, also das der Wert von IstInArena deaktiviert wird!
SetPVarInt(playerid, "IstInArena", 0);
Achja und zu deinem 5., wegen dem Warning, den kannste sowas von Ignorieren xD
//Wichtiger Edit:
Hab in der PN gesehen, dass dein Krankenhaus doch unter OnPlayerSpawn ist ^^, also bitte den Krankenhausteil so verändern...
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pTot] == 1)
{
if(PlayerPaintballing[playerid] == 0 && GetPVarInt(playerid, "IstInArena") == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_GREEN, "----------------Im Krankenhaus----------------");
SendClientMessage(playerid, COLOR_LIGHTRED, "Durch deine schweren Verletzungnen liegst du im Koma!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Du bist nun für ca. 60Sec. in Behandlug.");
ResetPlayerWeapons(playerid);
}
return 1;
}
return 1;
}