Hallo.
Ich habe mal gescriptet, dass Admins die virtuelle Welt setzen können.
Dann habe ich eine Abfrage in OnPlayerSpawn gemacht. Aber der Spieler spawnt immer an dem normalen Spawn ......
Habe schon vieles versucht. Habe es jetzt so, aber kriege 5 Errors:
public OnPlayerSpawn(playerid)
{
PlayerPlaySound(playerid, 1036, 0.0, 0.0, 0.0);
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"%s.savgame",pname);
//ResetPlayerWeapons(playerid);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
if(gTeam[playerid] == 0 || IsAMafia(playerid))
{
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 24, 50);
GivePlayerWeapon(playerid, 25, 50);
GivePlayerWeapon(playerid, 30, 450);
SetPlayerColor(playerid, COLOR_RED);
if(GetPlayerVirtualWorld(playerid)==1)
{
SetPlayerPos(playerid, 2201.2527,-1143.9147,1029.7969);
SetPlayerInterior(playerid, 15);
}
else if(GetPlayerVirtualWorld(playerid)==2)
{
SetPlayerPos(playerid, 1264.6923,-773.4435,1091.9063);
SetPlayerInterior(playerid, 5);
}
else if(GetPlayerVirtualWorld(playerid)==3)
{
SetPlayerPos(playerid, 2235.8574,1678.7686,1008.3594);
SetPlayerInterior(playerid, 1);
}
}
return 1;
}
if(gTeam[playerid] == 1 || IsAFBI(playerid))
{
GivePlayerWeapon(playerid, 41, 500);
GivePlayerWeapon(playerid, 23, 300);
GivePlayerWeapon(playerid, 27, 100);
GivePlayerWeapon(playerid, 31, 450);
SetPlayerColor(playerid, COLOR_MAFIA);
if(GetPlayerVirtualWorld(playerid)==1)
{
SetPlayerPos(playerid, 2220.8381,-1153.0044,1025.7969);
SetPlayerInterior(playerid, 15);
}
else if(GetPlayerVirtualWorld(playerid)==2)
{
SetPlayerPos(playerid, 1301.5267,-791.6212,1084.0149);
SetPlayerInterior(playerid, 5);
}
else if(GetPlayerVirtualWorld(playerid)==3)
{
SetPlayerPos(playerid, 2152.2529,1600.2825,1006.1741);
SetPlayerInterior(playerid, 1);
}
}
return 1;
}