Zitatpublic OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Spawn", "Cop\nTerror\nSwat\nGangster\nFrei\nFrei 2", "Auswählen", "Abbrechen");
return 1;
}
Das machste nicht unter "OnPlayerSpawn" sondern unter "OnPlayerConnect"
Also so:
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Spawn", "Cop\nTerror\nSwat\nGangster\nFrei\nFrei 2", "Auswählen", "Abbrechen");
return 1;
}
Das ganze sollte am besten schlussendlich so aussehen:
Unter OnPlayerConnect nicht unter OnPlayerSpawn:
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Spawn", "Cop\nTerror\nSwat\nGangster\nFrei\nFrei 2", "Auswählen", "Abbrechen");
return 1;
}
und das unter OnDialogResponse sollte so aussehen:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 5)
{
if(response)
{
if(listitem == 0)
{
// SetSpawnInfo(playerid,Team,Skin,X,Y,Z,A,Waffe1,Ammo1,Waffe2,Ammo2,Waffe3,Ammo3);
SetSpawnInfo(playerid,1,285,218.4359,1905.2633,17.7016,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
if(listitem == 1)
{
SetSpawnInfo(playerid,2,250,-228.9177,2602.8569,62.7031,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
if(listitem == 2)
{
SetSpawnInfo(playerid,3,186,-312.4494,1534.5494,75.5625,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
if(listitem == 3)
{
SetSpawnInfo(playerid,4,221,-297.8937,1099.0570,19.5938,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
if(listitem == 4)
{
SetSpawnInfo(playerid,5,113,-786.1680,1440.1334,13.7891,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
if(listitem == 5)
{
SetSpawnInfo(playerid,6,73,-1497.3909,2666.0513,55.6875,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
}
else
{
Kick(playerid); // Einfach die Abfrage mit "else" wegnehmen, wenn du nicht möchtest dass er gekickt wird
}
}
return 1;
}
hoffe konnte helfen!
MFG luckyguy