Sollte so klappen:
Ist aber ungetestet.
Musst halt nur SetPlayerPos(playeri,x,y,z);
ersetzen und interior setzen.
#include <a_samp>
#define Rot 0xAA3333AA
#define Green 0x33AA33AA
new inderby,derbystartet,pindurby[MAX_PLAYERS];
public OnFilterScriptInit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/derby", cmdtext, true, 10) == 0)
{
if(inderby>2)
{
SetPlayerPos(playerid,x,y,z);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid,Green,"Wilkommen in der Derby-Arena!");
SendClientMessageToAll(Green,"Ein Derby-Match hat begonnen!");
inderby = inderby+1;
pindurby[playerid]=1;
}
else
(
SetPlayerPos(playerid,x,y,z);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid,Green,"Wilkommen in der Derby-Arena!");
SendClientMessageToAll(Green,"Ein Derby-Match hat begonnen!");
inderby = inderby+1;
pindurby[playerid]=1;
}
}
if(strcmp("/derbyout", cmdtext, true, 10) == 0)
{
if(pindurby[playerid]==1;)
{
SetPlayerPos(playerid,x,y,z);
SendClientMessage(playerid,Green,"Du hast das Derby-Match verlassen!");
}
else
(
SendClientMessage(playerid,Rot,"Du nimmst nicht am Derby teil!");
}
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(inderby<2&&derbystartet==0)
{
SendClientMessage(playerid,Rot,"Es müssen mindestens 3 Spieler in der Derby-Arena sein!");
TogglePlayerControllable(playerid,0);
TogglePlayerControllable(playerid,1);
}
return 1;
}