Hey Breadfish,
also ich wollte eine DM Arena in der Bank erstellen dazu brauch ich Random Spawns, ich habe alles soweit gemacht aber wenn ich dann Befehl eingebe, fliege ich durch die Map.
ocmd:bank(playerid,params[])
{
if(Map[playerid] ==0)
{
new string[128];
format(string,sizeof(string),"||%s ist nun in der Bank [/bank]||",PlayerName(playerid));
SendClientMessageToAll(grün,string);
SetPlayerInterior(playerid,3);
new rand = random(sizeof(bankspawns));
SetPlayerPos(playerid, bankspawns[rand][0], bankspawns[rand][1],bankspawns[rand][2]);
Map[playerid] = 1;
bank[playerid] = 1;
GivePlayerWeapon(playerid,24,500);
}
else if(Map[playerid] == 1)
{
SendClientMessage(playerid,0x00FF8CFF,"Du bist schon in einer Arena. Tippe: /l um sie zu verlassen");
}
return 1;
}
Oben im Script:
new bank[MAX_PLAYERS];
new Float:bankspawns[][3] = {{-361.8030,186.9897,1008.3828},{-372.0488,170.4425,1014.1875},{-368.9661,171.5591,1019.9844}};
OnPlayerConne..
bank[playerid] = 0;
OnPlayerSpawn
if(bank[playerid] == 1){SetPlayerInterior(playerid,3);new rand = random(sizeof(bankspawns));SetPlayerPos(playerid, bankspawns[rand][0], bankspawns[rand][1],bankspawns[rand][2]);Map[playerid] = 1;bank[playerid] = 1;ResetPlayerWeapons(playerid);GivePlayerWeapon(playerid,24,999);GivePlayerWeapon(playerid,25,999);}