Hallo. Wenn ich /dm mache sollte InArena[playerid] auf 3 gesetzt werrden
und wenn er spawnt sollte er in die Arena wieder gesppawnt werden (nach Tod)
Nur geht das nicht, denn man spawnt am normalen Spawn..
Code:
ocmd:dm(playerid)
{
if(InArena[playerid] == 0)
{
new Random = random(sizeof(RandomDM));
SetPlayerPos(playerid, RandomDM[Random][0], RandomDM[Random][1], RandomDM[Random][2]);
SetPlayerFacingAngle(playerid, RandomDM[Random][3]);
ResetPlayerWeapons(playerid);
InArena[playerid] = 3;
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 25, 1000);
GivePlayerWeapon(playerid, 33, 1000);
SetPlayerInterior(playerid, 1);
DM++;
UpdateOverlay();
}
else
{
SendClientMessage(playerid,Weiss,"{FF0000}Fehler: {FFFFFF}Du bist schon in einer Arena");
}
return 1;
}
switch(InArena[playerid])
{
case 0:
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 1965.0482,1624.0115,12.8568);
SetPlayerSkin(playerid, Spieler[playerid][skin]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
case 1:
{
new Random = random(sizeof(RandomDeagle1));
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1000);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, RandomDeagle1[Random][0], RandomDeagle1[Random][1], RandomDeagle1[Random][2]);
SetPlayerFacingAngle(playerid, RandomDeagle1[Random][3]);
}
case 2:
{
new Random = random(sizeof(RandomDeagle2));
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1000);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, RandomDeagle2[Random][0], RandomDeagle2[Random][1], RandomDeagle2[Random][2]);
SetPlayerFacingAngle(playerid, RandomDeagle2[Random][3]);
}
case 3:
{
new Random = random(sizeof(RandomDM));
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 25, 1000);
GivePlayerWeapon(playerid, 33, 1000);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, RandomDM[Random][0], RandomDM[Random][1], RandomDM[Random][2]);
SetPlayerFacingAngle(playerid, RandomDM[Random][3]);
}
}
MfG
edit:Code
edit:Überschrift + /dm Befehl