Nabend,
ich hab mit meinem Derbysystem ein problem...
Wenn ich /derby mache und zur Map 2 komme dann bin spawne ich wieder also ich bin anscheined unter der angegeben positionen... obwohl es richtig ist!
if(strcmp("/derby",cmdtext,true,10) == 0)
{
if(Derby[playerid] < 1)
{
if(derbyspiel == 0)
{
new rand;
new rand2 = random(sizeof(AutoRandom));
carr = AutoRandom[rand2][0];
Derby[playerid] = 1;
zaehler++;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new string[128];
format(string, sizeof(string), "Aktuelle Spieleranzahl: %i", zaehler);
GameTextForAll( string, 2000, 3 );
format(string,sizeof(string),"Spieler %s macht nun beim /Derby mit!",name);
SendClientMessageToAll(0xFF5A00FF,string);
if(derbymap == 0)
{
SetPlayerPos(playerid,Derbyspawns[rand][0], Derbyspawns[rand][1], Derbyspawns[rand][2]);
pauto[playerid]=CreateVehicle(carr,Derbyspawns[rand][0], Derbyspawns[rand][1], Derbyspawns[rand][2]+2,Derbyspawns[rand][3],-1,-1,0);
PutPlayerInVehicle(playerid,pauto[playerid],0);
SetTimer("StartDerby", 5000, 0);
TogglePlayerControllable(playerid,false);
}
else if(derbymap == 1)
{
SetPlayerPos(playerid,Derbyspawns2[rand][0], Derbyspawns2[rand][1], Derbyspawns2[rand][2]);
pauto[playerid]=CreateVehicle(carr,Derbyspawns2[rand][0], Derbyspawns2[rand][1], Derbyspawns2[rand][2],Derbyspawns2[rand][3],-1,-1,0);
PutPlayerInVehicle(playerid,pauto[playerid],0);
SetTimer("StartDerby", 5000, 0);
TogglePlayerControllable(playerid,false);
hoehe[playerid] = SetTimerEx("Derbyhohe", 1000, 1, "i", playerid);
}
return 1;
}
else
{
SendClientMessage(playerid,0x5A5A5AFF,"Es ist zurzeit noch ein Derbyspiel! Versuch es später nochmal...");
}
}
else
{
SendClientMessage(playerid,0x5A5A5AFF,"Du spielst zurzeit in der Derby Arena! Verwende /derbyoff!");
}
return 1;
}
forward Derbyhohe(playerid);
public Derbyhohe(playerid)
{
if(Derby[playerid] > 0)
{
if(derbymap == 1)
{
new Float:pos[2], Float:z;
GetPlayerPos(playerid, pos[0], pos[1], z);
if(z<329.000)
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"Spieler %s ist runtergefallen!",name);
SendClientMessageToAll(0xFF5A00FF,string);
Derby[playerid] = 0;
SpawnPlayer(playerid);
zaehler--;
DestroyVehicle(pauto[playerid]);
pauto[playerid]=0;
StopDerby();
KillTimer(hoehe[playerid]);
}
}
}
return 1;
}
LG
Moritz