Hallo Community,
Seit 2-3 Tagen beim Einloggen spawne ich auf der Farm in Blueberry, obwohl das nicht der Spawnpunkt ist. Wenn ich in einer Fraktion bin ist es genauso. Wie kann ich das beheben ?
Ich poste mal mein OnPlayerSpawn.
mfg Fabian_DeSanta
public OnPlayerSpawn(playerid)
{
new string[128];
SendClientMessage(playerid, GRÜN, "");
SendClientMessage(playerid, GRÜN, "--------------------------------------------------------------------------------");
format(string, sizeof(string), "Willkommen auf {FFCC00}Hollywood Street of Life{FFFFFF}, {FFFFFF}%s.",SpielerName(playerid));
SendClientMessage(playerid, GELB,string);
if(sSpieler[playerid][Adminlevel] == 1)
{
format(string, sizeof(string), "Suppoter: {FFFFFF}%s",SpielerName(playerid));
SendClientMessage(playerid, GELB,string);
}
if(sSpieler[playerid][Adminlevel] == 2)
{
format(string, sizeof(string), "Moderator: {FFFFFF}%s",SpielerName(playerid));
SendClientMessage(playerid, GELB,string);
}
if(sSpieler[playerid][Adminlevel] == 3)
{
format(string, sizeof(string), "Admin: {FFFFFF}%s",SpielerName(playerid));
SendClientMessage(playerid, GELB,string);
}
if(sSpieler[playerid][Adminlevel] == 4)
{
format(string, sizeof(string), "Head-Admin: {FFFFFF}%s",SpielerName(playerid));
SendClientMessage(playerid, GELB,string);
}
if(sSpieler[playerid][Adminlevel] == 5)
{
format(string, sizeof(string), "Projektleiter: {FFFFFF}%s",SpielerName(playerid));
SendClientMessage(playerid, GELB,string);
}
if(sSpieler[playerid][Vipzeit] > 0 && sSpieler[playerid][Vip] > 0)
{
new days,hours,mins;
new premiumzeit = sSpieler[playerid][Vipzeit];
new restzeit= premiumzeit -gettime();
days = floatround(restzeit / 86400,floatround_floor);
hours = restzeit - (days * 86400);
hours = floatround(hours / 3600,floatround_floor);
mins = restzeit - ( (days * 86400) + (hours * 3600) );
mins = floatround(mins / 60,floatround_floor);
format(string, sizeof(string), "Verbleibende Premiumzeit: %d {FFFFFF}Tage.",days);
SendClientMessage(playerid, GELB,string);
}
SendClientMessage(playerid, GRÜN, "---------------------------------------------------------------------------------");
new house = sSpieler[playerid][Haus];
if(sSpieler[playerid][Haus] == 255 && sSpieler[playerid][SpawnChange] == 1 && neuerspieler[playerid] == 1)
{
sSpieler[playerid][SpawnChange] = 0;
}
if(sSpieler[playerid][SpawnChange] == 1 && sSpieler[playerid][Haus] != 255 && neuerspieler[playerid] == 1 && InBehandlung[playerid] == 0 && sSpieler[playerid][Knast] == 0)
{
SetPlayerInterior(playerid,HouseInt_Interior[HouseInfo[house][hInteriorID]]);
SetPlayerPos(playerid, HouseInt_Spawn_X[HouseInfo[house][hInteriorID]],HouseInt_Spawn_Y[HouseInfo[house][hInteriorID]],HouseInt_Spawn_Z[HouseInfo[house][hInteriorID]]);
SetPlayerVirtualWorld(playerid, house);
return 1;
}
if(sSpieler[playerid][Paintball] == 1)
{
SetPlayerPos(playerid,-975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid,10);
InBehandlung[playerid] = 0;
GivePlayerWeapon(playerid,22,100);
GivePlayerWeapon(playerid,25,100);
GivePlayerWeapon(playerid,34,100);
}
if(InBehandlung[playerid] == 1)
{
TogglePlayerControllable(playerid, 0);
SetPlayerPos(playerid, 50.2555,-190.4380,1404.8246);
SetCameraBehindPlayer(playerid);
SetPlayerFacingAngle(playerid,134.7829);
SetTimerEx("BehandlungsInfo", 1000, false, "d", playerid);
}
if(sSpieler[playerid][Gangjail] == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -230.5179,1506.8551,75.5625);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, BLAU, " Du befindest dich noch im GangJail!");
return 1;
}
if(sSpieler[playerid][Geschlecht] == 1)
{
SetPlayerSkin(playerid,29);
sSpieler[playerid][Skin] = 29;
SetPlayerColor(playerid,WEIS);
return 1;
}
if(sSpieler[playerid][Geschlecht] == 2)
{
SetPlayerSkin(playerid,211);
sSpieler[playerid][Skin] = 211;
SetPlayerColor(playerid,WEIS);
return 1;
}
if(pFirstLog[playerid] == true || neuerspieler[playerid] != 0)
{
SetPlayerPos(playerid,839.3776,-2062.0535,12.8672); // Tutorial Position
SetPlayerCameraPos(playerid,794.2142,-2184.9741,31.8352);
SetPlayerCameraLookAt(playerid,839.3776,-2062.0535,12.8672);
SetPlayerFacingAngle(playerid,179.0452);
TogglePlayerControllable(playerid,false);
TutTime[playerid] = 1;
TutTimer[playerid] = SetTimerEx("Tutorial",1000,1,"i",playerid);
return 1;
}
if(sSpieler[playerid][Knast] == 1)
{
SendClientMessage(playerid,ROT,"Haftstrafe noch nicht abgessen!");
SetPlayerPos(playerid,197.8290,161.8141,1003.0300);
SetPlayerInterior(playerid,3);
ResetPlayerWeapons(playerid);
SetTimerEx("Gefaengnis",60000,0,"i",playerid);
return 1;
}
if(sSpieler[playerid][Prison] == 1)
{
SendClientMessage(playerid,ROT,"Prisonzeit noch nicht abgessen!");
SetPlayerPos(playerid, 271.1351,1858.3071,8.7578);
SetPlayerInterior(playerid,0);
ResetPlayerWeapons(playerid);
SetTimerEx("Prisonzeit",60000,0,"i",playerid);
return 1;
}
if(sSpieler[playerid][Leader] == 14 || sSpieler[playerid][Member] == 14) //Taxifahrer
{
SetPlayerPos(playerid,2564.0449,1044.0701,10.8203);
SetPlayerFacingAngle(playerid,266.5267);
SetCameraBehindPlayer(playerid);
SetPlayerColor(playerid,GELB);
SetPlayerSkin(playerid,189);
GivePlayerWeapon(playerid,3,1);
return 1;
}
if(sSpieler[playerid][Leader] == 6) //LSRD
{
if(sSpieler[playerid][Rank] == 13 || sSpieler[playerid][Rank] == 12)
{
SetPlayerColor(playerid,ROT);
SetPlayerSkin(playerid,70);
SetPlayerPos(playerid,34.0039,-200.8683,1404.8246);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
}
if(sSpieler[playerid][Member] == 6) //LSRD
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid,274);
SetPlayerColor(playerid,ROT);
SetPlayerPos(playerid,34.0039,-200.8683,1404.8246);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
else if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid,275);
SetPlayerColor(playerid,ROT);
SetPlayerPos(playerid,34.0039,-200.8683,1404.8246);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
}
if(sSpieler[playerid][Leader] == 1) //LSPD
{
if(sSpieler[playerid][Rank] == 13)
{
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,283);
SetPlayerInterior(playerid,6);
return 1;
}
else if(sSpieler[playerid][Rank] == 12)
{
SetPlayerSkin(playerid, 288);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(sSpieler[playerid][Member] == 1) //LSPD
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid, 281);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid, 280);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(sSpieler[playerid][Rank] == 3)
{
SetPlayerSkin(playerid, 267);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.5771,69.6547,1005.0391);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(sSpieler[playerid][Leader] == 5 || sSpieler[playerid][Member] == 5) //San News
{
SetPlayerColor(playerid,ORANGE);
GivePlayerWeapon(playerid,43,9999);
SetPlayerSkin(playerid,187);
SetPlayerPos(playerid,996.7645,-1460.3590,13.5469);
SetCameraBehindPlayer(playerid);
return 1;
}
if(sSpieler[playerid][Leader] == 9) //Grove Street
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid,269);
SetPlayerPos(playerid,2496.049804,-1695.238159,1014.742187);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
return 1;
}
if(sSpieler[playerid][Leader] == 9 || sSpieler[playerid][Rank] == 12) //Grove Street
{
SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid, 270);
return 1;
}
if(sSpieler[playerid][Member] == 9) //Grove Street
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid, 105);
SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
return 1;
}
else if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid, 106);
SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
return 1;
}
else if(sSpieler[playerid][Rank] == 3)
{
SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid, 107);
return 1;
}
else if(sSpieler[playerid][Rank] == 4)
{
SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid, 270);
return 1;
}
else if(sSpieler[playerid][Geschlecht] == 2)
{
SetPlayerPos(playerid,2496.1577,-1709.3999,1014.7422);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
return 1;
}
}
if(sSpieler[playerid][Leader] == 8) //Ballas
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid,104);
SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
return 1;
}
if(sSpieler[playerid][Member] == 8) //Ballas
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid,66);
return 1;
}
else if(sSpieler[playerid][Rank] == 2)
{
SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid,102);
return 1;
}
else if(sSpieler[playerid][Rank] == 3)
{
SetPlayerSkin(playerid,104);
SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
return 1;
}
else if(sSpieler[playerid][Rank] == 4)
{
SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid, 176);
return 1;
}
else if(sSpieler[playerid][Geschlecht] == 2)
{
SetPlayerPos(playerid,2809.1396,-1162.2145,1029.1646);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid,103);
return 1;
}
}
if(sSpieler[playerid][Leader] == 11) //Hitman
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,165);
SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
return 1;
}
if(sSpieler[playerid][Leader] == 11) //Hitman
{
SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,166);
return 1;
}
if(sSpieler[playerid][Member] == 11) //Hitman
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,122);
return 1;
}
else if(sSpieler[playerid][Rank] == 2)
{
SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,117);
return 1;
}
else if(sSpieler[playerid][Rank] == 3)
{
SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,120);
return 1;
}
else if(sSpieler[playerid][Rank] == 4)
{
SetPlayerPos(playerid,2449.3853,-1689.1703,1013.5078);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,164);
return 1;
}
}
if(sSpieler[playerid][Leader] == 10) //Los Santos Vagos
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,22,50);
SetPlayerSkin(playerid,109);
SetPlayerPos(playerid,322.9197,1119.7819,1083.8828);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
if(sSpieler[playerid][Leader] == 10) //Los Sanots Vagos
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
SetPlayerSkin(playerid,110);
return 1;
}
if(sSpieler[playerid][Member] == 10)
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid,30);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
else if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid,108);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
else if(sSpieler[playerid][Rank] == 3)
{
SetPlayerSkin(playerid,292);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
}
if(sSpieler[playerid][Leader] == 4) //President
{
SetPlayerColor(playerid,WEIS);
SetPlayerSkin(playerid,295);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
if(sSpieler[playerid][Member] == 4)
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
SetPlayerSkin(playerid,163);
return 1;
}
else if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid,166);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
}
if(sSpieler[playerid][Leader] == 7 || sSpieler[playerid][Member] == 7) //Oamt
{
SetPlayerColor(playerid,HELLBLAU);
GivePlayerWeapon(playerid,41,2000);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,1511.0232,-1461.5570,9.5000);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,71);
return 1;
}
if(sSpieler[playerid][Leader] == 2 || sSpieler[playerid][Member] == 2) //FBI
{
SetPlayerColor(playerid,WEIS);
SetPlayerSkin(playerid,286);
GivePlayerWeapon(playerid,29,999);
GivePlayerWeapon(playerid,30,999);
SetPlayerPos(playerid,216.4731,113.5795,1003.2188);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,10);
return 1;
}
if(sSpieler[playerid][Leader] == 12 || sSpieler[playerid][Member] == 12) //Feuerwehr
{
SetPlayerColor(playerid,DUNKELROT);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid,1390.0193,-1637.1361,13.5469);
GivePlayerWeapon(playerid,42,3000);
SetPlayerSkin(playerid,277);
return 1;
}
if(sSpieler[playerid][Leader] == 3 || sSpieler[playerid][Member] == 3) //Army
{
SetPlayerColor(playerid,GRÜN);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid,-1345.9232,491.7726,11.2027);
GivePlayerWeapon(playerid,24,500);
GivePlayerWeapon(playerid,31,500);
GivePlayerWeapon(playerid,29,500);
SetPlayerSkin(playerid,287);
return 1;
}
if(sSpieler[playerid][Leader] == 13 || sSpieler[playerid][Member] == 13) //HSB
{
SetPlayerColor(playerid,WEIS);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid,2324.3286,-1143.7377,1050.4922);
GivePlayerWeapon(playerid,22,50);
GivePlayerWeapon(playerid,5,1);
SetPlayerSkin(playerid,24);
SetPlayerInterior(playerid,12);
return 1;
}
RemovePlayerAttachedObject(playerid,1);
return 1;
}