Guten Morgen,
folgendes ... ich versuche einen RandomSpawn für Area51 zu machen... als Deathmatch....
Und damit das ganze hübsch ist soll man da auch per Listmenu reinkommen......
Werdet ihr gleich sehen wie das gemeint ist....
P.S. PWN code kann sich hierziehen
new Float:AreaDmSpawn[14][4] = {
(223.3941,1856.5365,13.0445,32.3033),
(223.4804,1931.4097,17.6406,270.7522),
(231.1663,1934.8198,33.8984,154.7709),
(283.1122,1829.1936,17.6481,5.6697),
(262.1633,1807.3755,25.4985,83.0403),
(211.5856,1810.9163,21.8672,1.5729),
(165.7416,1847.8689,33.8984,276.2987),
(171.5316,1835.0181,17.6406,91.4770),
(113.8523,1814.1409,25.4985,302.0157),
(117.7205,1870.2177,17.8359,180.8014),
(138.0463,1889.6281,18.3175,264.7756),
(102.3924,1922.7786,18.3494,270.3923),
(164.6198,1934.0310,18.5895,180.4644),
(222.6791,1833.8066,23.2422,312.2164)
};
public OnPlayerSpawn(playerid)
{
if(areadm[playerid] == 1)
{
new rand;
rand = random(sizeof(AreaDmSpawn));
SetPlayerPos(playerid,AreaDmSpawn[rand][0],AreaDmSpawn[rand][1],AreaDmSpawn[rand][2]);
SetPlayerFacingAngle(playerid,AreaDmSpawn[rand][3]);
GivePlayerWeapon(playerid,24,99999);
GivePlayerWeapon(playerid,29,99999);
GivePlayerWeapon(playerid,30,99999);
}
else
{
GivePlayerMoney(playerid, startgeld);
SetPlayerPos(playerid, 1958.3783,1343.1572,15.3746);
return 1;
}
return 1;
}
if(strcmp("/dm",cmdtext, true) == 0)
{
new listitems[] = "1\tArea51";
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Deathmatches",listitems,"Auswählen","Abbrechen");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0)
{
if(response)
{
GameTextForPlayer(playerid,"~g~Regeln Akzeptiert",500,1);
} else {
GameTextForPlayer(playerid,"~r~Regeln Abgelehnt",2000,1);
SendClientMessage(playerid,c_rot,"|--> Unsere Regeln sollten schon eingehalten werden.");
Kick(playerid);
}
return 1;
}
if(dialogid == 2)
{
if(response)
{
if(listitem != 1)
{
areadm[playerid] = 1;
GameTextForPlayer(playerid,"~r~Area 51 DM ~w~Beigetreten",1500,3);
SetPlayerVirtualWorld(playerid, 1);
SpawnPlayer(playerid);
return 1;
}
}
else
{
GameTextForPlayer(playerid,"~r~Abgebrochen",500,1);
}
return 1; // we processed it.
}
return 1;
}
So ......
jetzt hab ich hier 0 Fehler vorliegen.....
Allerdings werde ich anstatt bei den RandSpawns... immer am 0 Punkt gespawnt.....
Bitte um hilfe....