Hallo Breadfish
wenn ich mich auf mein Server einlogge fliege ich für 10 Sekunden vom himmel danach spawne ich erst wo rann kann es liegen??
mfg Paddy87
Hallo Breadfish
wenn ich mich auf mein Server einlogge fliege ich für 10 Sekunden vom himmel danach spawne ich erst wo rann kann es liegen??
mfg Paddy87
Braucht vielleicht der Public zum Spawnen zu lange zum durchlaufen oder ein Timer ?
der Public zum Spawnen braucht zu lange zum durchlaufen
Wählst du auch eine Klasse aus bzw. hast du default Spawn Koordinaten?
Wenn nicht, dann mag es daran liegen, das du die default Spawn Daten nutzt, welche X=0.0, Y=0.0, Z=0.0 sind und du hier unter der Map bist.
Daher kannst du z.B. die Spawndaten für einen Nutzer direkt beim Connecten einmal zuweisen und dann eben die AddClass bzw. RequestClass Daten verwenden.
hier die Codes
Function OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
Spielerinfo[playerid][StonedHP] = 0.0;
FeuerDuty[playerid] = 0;
OnDuty[playerid] = 0;
JobDuty[playerid] = 0;
FonDuty[playerid] = 0;
// untere leiste
TextDrawShowForPlayer(playerid, UntereLeiste0);
TextDrawShowForPlayer(playerid, UntereLeiste1);
TextDrawShowForPlayer(playerid, UntereLeiste2);
if(GetPlayerACHealth(playerid) == 0)
{
SetPlayerACHealth(playerid,10.00);
}
for(new i = 1;i< 14;i++) GivePlayerWeapon(playerid,g_weapon[playerid][i-1],g_ammo[playerid][i-1]);
if(GeldwaschCP[playerid] == 1){
SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.000000, -0.220224, 0.000000, 1.166815, 85.423309, 0.000000, 1.000000, 1.000000, 1.000000 ); //Geldsack an den Spieler hängen
SendClientMessage(playerid,0xAA3333AA,"Du musst das Geld noch Waschen Lassen!");
SetPlayerCheckpoint(playerid,-2491.6199,2363.2437,10.2727,2.0);
GeldwaschCP[playerid] = 1;}
if(GeldwaschCP[playerid] == 2){
SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.000000, -0.220224, 0.000000, 1.166815, 85.423309, 0.000000, 1.000000, 1.000000, 1.000000 ); //Geldsack an den Spieler hängen
SendClientMessage(playerid,0xAA3333AA,"Du musst das Geld noch Waschen Lassen!");
SetPlayerCheckpoint(playerid,-2522.4043,1216.3790,37.4283,2.0);
GeldwaschCP[playerid] = 2;}
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Hans", true))
{
new string[128];
SetPlayerColor(playerid,GELB);
format(string,sizeof(string),"{FFFF00}Regional Express\n{FFFFFF}Zugfahrer/in: {00FFFF}%s",botname);
zuginfo[GetPlayerVehicleID(playerid)] = Create3DTextLabel(string,BUSuTAXIDUTYFARBE,0.0,0.0,0.0,25.0,0,0);
Attach3DTextLabelToVehicle(zuginfo[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.0,0.0,0.0);
Spielerinfo[playerid][pLevel] = 100;
Spielerinfo[playerid][pAdmin] = 11;
Spielerinfo[playerid][pCarLic] = 1;
Spielerinfo[playerid][pNewLic] = 1;
Spielerinfo[playerid][pFlyLic] = 1;
Spielerinfo[playerid][pBoatLic] = 1;
Spielerinfo[playerid][pGunLic] = 1;
Spielerinfo[playerid][pLKWLic] = 1;
Spielerinfo[playerid][pRollerLic] = 1;
Spielerinfo[playerid][pTaxiLic] = 1;
Spielerinfo[playerid][pMotoLic] = 1;
Spielerinfo[playerid][pAbschlepperschein] = 1;
Spielerinfo[playerid][pChar] = 255;
Spielerinfo[playerid][pJob] = 14;
Spielerinfo[playerid][pPnumber] = 0;
PutPlayerInVehicle(playerid, car_zug, 0);
}
}
PlayerGangZonesShow(playerid, 1);
STDPlayer[playerid] = 0;
gTeam[playerid] = Spielerinfo[playerid][pTeam]; //Set the Team
if (gTeam[playerid] == 4) //medic / criminal reset team
{
gTeam[playerid] = 3;
}
if(Spielerinfo[playerid][pTot] == 1 && Spielerinfo[playerid][pLevel] > 2 && Spielerinfo[playerid][pJailed] == 0 && Spielerinfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
SetPlayerPos(playerid, ppX, ppY, ppZ);
SetTimerEx("Spawn",1000,false,"i",playerid);
TogglePlayerControllable(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,Spielerinfo[playerid][pChar]);
return 1;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Um auf "#SERVERNAME" Spielen zu können musst du dich erst Registrieren");
FreezePlayer(playerid);
Kick(playerid);
return 1;
}
if(AtClothes[playerid] == 1)
{
Spielerinfo[playerid][pChar] = GetPlayerSkin(playerid);
Spielerinfo[playerid][pModel] = GetPlayerSkin(playerid);
AtClothes[playerid] = 0;
}
if(gTeam[playerid] == 11 && Spielerinfo[playerid][pLeader] < 1)
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Chef dieser Familie, du bist Zivilist !");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
if(gTeam[playerid] == 5)
{
if(Spielerinfo[playerid][pMember] < 1)
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Mitglied dieser Familie, du bist Zivilist !");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
}
if(gTeam[playerid] == 10)
{
if(Spielerinfo[playerid][pMember] != 8)
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Mitglied dieser Fraktion, du bist Zivilist !");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
}
if(gTeam[playerid] == 2 && !IsACop(playerid))
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Polizist!");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
if(gTeam[playerid] == 3)
{
if(Spielerinfo[playerid][pMember] > 0 || Spielerinfo[playerid][pLeader] > 0)
{
MedicBill[playerid] = 0;
new model = Spielerinfo[playerid][pChar];
//Member
if(Spielerinfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 2; gTeam[playerid] = 2; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 2; gTeam[playerid] = 2; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 3, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//
else if(Spielerinfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 4, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 1; gTeam[playerid] = 1; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 6, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//
else if(Spielerinfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 7, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 7; gTeam[playerid] = 7; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 8, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 10; gTeam[playerid] = 10; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 9, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 5; gTeam[playerid] = 5; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Groove Street
else if(Spielerinfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Ballas
else if(Spielerinfo[playerid][pMember] == 12) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Los Santos Vagos
//Leaders
else if(Spielerinfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 3, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }// Feuerwehr
else if(Spielerinfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 4, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 6, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }// Oamt
else if(Spielerinfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 7, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 8, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 9, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Groove Street
else if(Spielerinfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Ballas
else if(Spielerinfo[playerid][pLeader] == 12) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Los Santos Vagos
//SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);
}
}
if(!gPlayerAnimLibsPreloaded[playerid])
{
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
gPlayerAnimLibsPreloaded[playerid] = 1;
}
if(Spielerinfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, Spielerinfo[playerid][pChar]); }
else { SetPlayerSkin(playerid, Spielerinfo[playerid][pModel]); }
//SetPlayerWeapons(playerid);
SetPlayerSpawn(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerToTeamColor(playerid);
PlayerFixRadio(playerid);
if(MapIconsShown[playerid] != 1)
{
MapIconsShown[playerid] = 1;
SetPlayerMapIcon(playerid, 1,1789.6616,-1121.6483,24.0859, 20, COLOR_YELLOW);//Feuerwehr Sirene
SetPlayerMapIcon(playerid, 3,1481.0009,-1770.3896,18.7958,38,COLOR_YELLOW);//Stadthalle
SetPlayerMapIcon(playerid, 4, 1544.4790,-1673.6595,13.5585, 30, COLOR_YELLOW); // LSPD
SetPlayerMapIcon(playerid, 5, -2052.7024,-101.7683,35.1641, 38, COLOR_YELLOW); // Fahrschule
SetPlayerMapIcon(playerid, 6, 1480.9323,-1767.7324,18.7958, 38, COLOR_YELLOW); // Stadthalle
SetPlayerMapIcon(playerid, 7, 1944.3260,-1772.9254,13.3906, 42, COLOR_YELLOW); // Tankstelle LS
SetPlayerMapIcon(playerid, 8, -1609.7958,-2718.2048,48.5391, 42, COLOR_YELLOW); // Tankstelle LS
SetPlayerMapIcon(playerid, 9, -2408.7590,976.0934,45.4175, 42, COLOR_YELLOW); // Tankstelle SF
SetPlayerMapIcon(playerid, 10, -1676.6323,414.0262,6.9484, 42, COLOR_YELLOW); // Tankstelle zwischen LS und SF
SetPlayerMapIcon(playerid, 11, 614.9333,1689.7418,6.6968, 42, COLOR_YELLOW); // Tankstelle LV
SetPlayerMapIcon(playerid, 12, -1327.7218,2678.8723,50.0625, 42, COLOR_YELLOW); // Tankstelle LV
SetPlayerMapIcon(playerid, 13, 1017.9830,-919.3538,42.3359, 27, COLOR_YELLOW); // FARBE NORTH
SetPlayerMapIcon(playerid, 14, 1911.2693,-1776.6720,13.3828, 27, COLOR_YELLOW); // /FARBE SOUTH
SetPlayerMapIcon(playerid, 15, 2023.4214,-2442.2095,13.5469, 27, COLOR_YELLOW); // /FARBE AIRPORT
SetPlayerMapIcon(playerid, 16, 461.5126,-1529.1906,29.9576, 12, COLOR_YELLOW); // /Arbeitsamt
SetPlayerMapIcon(playerid, 17, 1464.3953,-1028.0828,23.8281,52,COLOR_YELLOW);//Bank LS
SetPlayerMapIcon(playerid, 18, 1172.3250,-1321.6505,15.3993,22,COLOR_YELLOW);//Krankenhaus
SetPlayerMapIcon(playerid, 19, 2489.3245,-1667.5101,14.5585, 62, COLOR_YELLOW); // grove map
SetPlayerMapIcon(playerid, 20, 1995.5549,-1135.5896,25.4520, 59, COLOR_YELLOW); // Ballas map
SetPlayerMapIcon(playerid, 21, 2533.8320,-1047.7485,69.4141, 60, COLOR_YELLOW); // Vagos map
SetPlayerMapIcon(playerid, 25, 2216.8887,-1161.4492,25.7266,35,COLOR_YELLOW);//Hotel
SetPlayerMapIcon(playerid, 27, 2202.2104,2474.0771,10.8203, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 28, 2113.8049,920.1666,10.8203, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 29, 1678.5032,61.2240,38.2888, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 30, 1004.0560,-933.4848,42.1797, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 31, 1939.1482,-1773.1575,13.3828, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 32, -90.4686,-1169.2285,2.4086, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 33, -1675.0731,414.0955,7.1797, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 34, -2414.8630,975.2982,45.2969, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 35, -1609.7958,-2718.2048,48.5391, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 36, -1328.7947,2677.7437,50.0625, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 37, 1382.8003,462.5798,20.1421, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 38, 656.0778,-564.8906,16.3359, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 39, 500.1981,-1359.5757,16.2711, 45, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 40, 1456.9403,-1138.0343,23.9763, 45, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 41, 2244.4800,-1664.0601,15.4766, 45, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 42, 1172.3250,-1321.6505,15.3993,22,COLOR_YELLOW);//Krankenhaus
SetPlayerMapIcon(playerid, 43, 1192.8273,-924.8173,42.9004, 10,COLOR_YELLOW);//BSN
}
return 1;
}
Alles anzeigen
Function SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Hans", true))
{
new string[128];
SetPlayerColor(playerid,GELB);
format(string,sizeof(string),"{FFFF00}Regional Express\n{FFFFFF}Zugfahrer/in: {00FFFF}%s",botname);
zuginfo[GetPlayerVehicleID(playerid)] = Create3DTextLabel(string,BUSuTAXIDUTYFARBE,0.0,0.0,0.0,25.0,0,0);
Attach3DTextLabelToVehicle(zuginfo[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.0,0.0,0.0);
Spielerinfo[playerid][pHealth] = 50;
Spielerinfo[playerid][pLevel] = 100;
Spielerinfo[playerid][pAdmin] = 11;
Spielerinfo[playerid][pCarLic] = 1;
Spielerinfo[playerid][pNewLic] = 1;
Spielerinfo[playerid][pFlyLic] = 1;
Spielerinfo[playerid][pBoatLic] = 1;
Spielerinfo[playerid][pGunLic] = 1;
Spielerinfo[playerid][pLKWLic] = 1;
Spielerinfo[playerid][pRollerLic] = 1;
Spielerinfo[playerid][pTaxiLic] = 1;
Spielerinfo[playerid][pMotoLic] = 1;
Spielerinfo[playerid][pAbschlepperschein] = 1;
Spielerinfo[playerid][pChar] = 255;
Spielerinfo[playerid][pJob] = 14;
Spielerinfo[playerid][pPnumber] = 0;
PutPlayerInVehicle(playerid, car_zug, 0);
}
}
if(Spielerinfo[playerid][pTut] == 0 && !IsPlayerNPC(playerid))
{
SetPlayerCameraPos(playerid, 1668.0225, -1262.5676, 253.6837);
SetPlayerCameraLookAt(playerid, 1667.9021, -1263.5598, 253.2037);
SetPlayerPos(playerid,1667.0026,-1247.3528,233.3750);
SetPlayerFacingAngle(playerid, 181.4726);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
FreezePlayer(playerid);
AtRegestration[playerid] = 1;
RegistrationStep[playerid] = 1;
//SendClientMessage(playerid, COLOR_YELLOW, " ");
//SendClientMessage(playerid, COLOR_LIGHTRED, " Bist du Männlich oder Weiblich?");
ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"{FFFFFF}Wähle dein {00FFFF}Geschlecht {FFFFFF}aus","{FFFFFF}Gehörst du des {00FFFF}Männlichen {FFFFFF}oder {00FFFF}Weiblichen {FFFFFF}Geschlechts an?","Männlich","Weiblich");
//----------------
//ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Bist du Männlich oder Weiblich?","Erstellen","Abbrechen");
//ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login to your account",s,"Login","Cancel");
// ShowMenuForPlayer(Geschlecht,playerid);
}
}
new rand;
new house = Spielerinfo[playerid][pPhousekey];
if(PlayerPaintballing[playerid] != 0)
{
ResetPlayerWeapons(playerid);
UnFreezePlayer(playerid);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 24, 999);
rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
print("Spawn Paintball");
return 1;
}
if(KnastTime[playerid] > 0)
{
SetPlayerToKnast(playerid,Knast[playerid]);
SetPlayerHealth(playerid,100);
SetCameraBehindPlayer(playerid);
UnFreezePlayer(playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, " Flüchten bringt nichts, zurück in die Zelle!");
TextDrawShowForPlayer(playerid, Knastzeit[0]);
TextDrawShowForPlayer(playerid, Knastzeit[1]);
TextDrawShowForPlayer(playerid, Knastzeit[2]);
TextDrawShowForPlayer(playerid, Knastzeit[3]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][0]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][1]);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,1);
ResetPlayerWeapons(playerid);
print("Spawn Zelle");
return 1;
}
if(Spielerinfo[playerid][pJailed] == 1)
{
new krand = random(sizeof(RandomKnast));
SetPlayerPos(playerid, RandomKnast[krand][0], RandomKnast[krand][1],RandomKnast[krand][2]);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
UnFreezePlayer(playerid);
SetPlayerHealth(playerid,100);
TogglePlayerControllable(playerid, 1);
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid,1);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, "Flüchten bringt nichts, zurück in die Zelle!");
TextDrawShowForPlayer(playerid, Knastzeit[0]);
TextDrawShowForPlayer(playerid, Knastzeit[1]);
TextDrawShowForPlayer(playerid, Knastzeit[2]);
TextDrawShowForPlayer(playerid, Knastzeit[3]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][0]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][1]);
print("Spawn Zelle");
return 1;
}
if(Spielerinfo[playerid][pJailed] == 2)
{
FreezePlayer(playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, "Du wurdest wieder ins Alcatraz Gefängnis gebracht!");
TextDrawShowForPlayer(playerid, Knastzeit[0]);
TextDrawShowForPlayer(playerid, Knastzeit[1]);
TextDrawShowForPlayer(playerid, Knastzeit[2]);
TextDrawShowForPlayer(playerid, Knastzeit[3]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][0]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][1]);
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid, 1);
ResetPlayerWeapons(playerid);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
new krand = random(sizeof(RandomalcaKnast));
SetPlayerPos(playerid, RandomalcaKnast[krand][0], RandomalcaKnast[krand][1],RandomalcaKnast[krand][2]);
UnFreezePlayer(playerid);
print("Spawn Alcatraz Gefängnis");
return 1;
}
if(Spielerinfo[playerid][pGangJailed] == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, -368.4912,-1429.0795,25.7266);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im GangJail!");
print("Spawn GangJail");
return 1;
}
if(Spielerinfo[playerid][pSpawnChange] == 3)
{
if (Spielerinfo[playerid][pMember] == 1 || Spielerinfo[playerid][pLeader] == 1)// LS Police spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,1556.4081,-1668.2754,3004.4851);
ResetPlayerWeapons(playerid);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerVirtualWorld(playerid,1);
SetPlayerInterior(playerid,1);
UnFreezePlayer(playerid);
print("Spawn LSPD");
return 1;
}
if (Spielerinfo[playerid][pMember] == 2 || Spielerinfo[playerid][pLeader] == 2)//Army spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 235.3255,1919.5337,17.6481);
SetPlayerFacingAngle(playerid,140.1929);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Army");
return 1;
}
if (Spielerinfo[playerid][pMember] == 3 || Spielerinfo[playerid][pLeader] == 3) //Feuerwehr LS Spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,1738.1647,-1116.9089,3832.2930);
SetPlayerFacingAngle(playerid,90.0000);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Feuerwehr");
return 1;
}
if (Spielerinfo[playerid][pMember] == 4 || Spielerinfo[playerid][pLeader] == 4)//Medicspawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1183.5485,-1383.0797,13.3888);
SetPlayerFacingAngle(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Medic");
return 1;
}
if (Spielerinfo[playerid][pMember] == 5 || Spielerinfo[playerid][pLeader] == 5) //Fahrschule spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,-2021.8616,-100.9839,35.1641);
SetPlayerFacingAngle(playerid,70);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Fahrschule");
return 1;
}
if (Spielerinfo[playerid][pMember] == 6 || Spielerinfo[playerid][pLeader] == 6) //Oamt spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,919.6495,-1239.6622,17.0559);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Oamt");
return 1;
}
if(Spielerinfo[playerid][pLeader] == 7)//Präsident spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1290.6393,-791.4279,1089.9375);
SetPlayerInterior(playerid, 5);
SetPlayerVirtualWorld(playerid, 4);
UnFreezePlayer(playerid);
print("Spawn Präsident");
return 1;
}
if(Spielerinfo[playerid][pMember] == 7)//Bodyguard spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1274.0594,-790.8364,1089.9316);
SetPlayerInterior(playerid, 5);
SetPlayerVirtualWorld(playerid, 4);
UnFreezePlayer(playerid);
print("Spawn Präsident");
return 1;
}
if (Spielerinfo[playerid][pMember] == 8 || Spielerinfo[playerid][pLeader] == 8) //Hitman spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 935.3979,1726.9061,-15.6196);
SetPlayerFacingAngle(playerid,75.3922);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Hitman");
return 1;
}
if (Spielerinfo[playerid][pLeader] == 9)//Leader Yakuza
{
SetPlayerToTeamColor(playerid);// fraktions farbe
SetPlayerVirtualWorld(playerid,0);// virtuelle welt
SetPlayerPos(playerid,935.3979,1726.9061,-15.6196);//spawn koordinaten
SetPlayerFacingAngle(playerid,115.0242);
SetPlayerInterior(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Yakuza");
return 1;
}
if(Spielerinfo[playerid][pMember] == 9)//Member Yakuza
{
SetPlayerToTeamColor(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,935.3979,1726.9061,-15.6196);//spawn koordinaten
SetPlayerFacingAngle(playerid,115.0242);
SetPlayerInterior(playerid, 0);
if(Spielerinfo[playerid][pRank] == 1 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 122);
}
else if(Spielerinfo[playerid][pRank] == 2 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 123);
}
else if(Spielerinfo[playerid][pRank] == 3 || Spielerinfo[playerid][pRank] == 4 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 294);
}
else if(Spielerinfo[playerid][pRank] == 5 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 186);
}
else if(Spielerinfo[playerid][pRank] >= 6 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 228);
}
else if(Spielerinfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 169);
}
UnFreezePlayer(playerid);
print("Spawn Yakuza");
return 1;
}
if (Spielerinfo[playerid][pMember] == 10 || Spielerinfo[playerid][pLeader] == 10) //GROOVE STREET FAMILIY
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2495.3064,-1703.9044,1018.3438);
SetPlayerFacingAngle(playerid,90.0000);
SetPlayerInterior(playerid,3);
Spielerinfo[playerid][pInt] = 3;
SetPlayerVirtualWorld(playerid,1);
UnFreezePlayer(playerid);
print("Spawn GROOVE");
return 1;
}
if (Spielerinfo[playerid][pMember] == 11 || Spielerinfo[playerid][pLeader] == 11) //BALLAS GANG
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
SetPlayerFacingAngle(playerid,281.6475);
SetPlayerInterior(playerid,8);
Spielerinfo[playerid][pInt] = 8;
SetPlayerVirtualWorld(playerid,6);
UnFreezePlayer(playerid);
print("Spawn BALLAS");
return 1;
}
if (Spielerinfo[playerid][pMember] == 12 || Spielerinfo[playerid][pLeader] == 12) //Los Santos Vagos
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
SetPlayerVirtualWorld(playerid,8);
SetPlayerFacingAngle(playerid,88.9785);
SetPlayerInterior(playerid,8);
Spielerinfo[playerid][pInt] = 8;
if(Spielerinfo[playerid][pRank] >= 0 && Spielerinfo[playerid][pRank] <= 2)
{
SetPlayerSkin(playerid, 110);
}
else if(Spielerinfo[playerid][pRank] >= 3 && Spielerinfo[playerid][pRank] <= 5)
{
SetPlayerSkin(playerid, 108);
}
else if(Spielerinfo[playerid][pLeader] == 12)
{
SetPlayerSkin(playerid, 109);
}
UnFreezePlayer(playerid);
print("Spawn Vagos");
return 1;
}
if ((gTeam[playerid]) == 1)
{
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gMedPlayerSpawns));
SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn MedPlayerSpawns");
return 1;
}
}
if(Spielerinfo[playerid][pSpawnChange] == 0){
if(Spielerinfo[playerid][pOrigin] == 1 || Spielerinfo[playerid][pOrigin] == 2 || Spielerinfo[playerid][pOrigin] == 3)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,477.8253,-1499.5513,20.4956);//hieromg
SetPlayerFacingAngle(playerid,279.4515);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Zivispawn");
return 1;
}
}
if(Spielerinfo[playerid][pSpawnChange] == 1 && house != 255)
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
Spielerinfo[playerid][pLocal] = house;
Spielerinfo[playerid][pInt] = HouseInfo[house][hInt];
SetPlayerVirtualWorld(playerid,house);
UnFreezePlayer(playerid);
print("Spawn Haus");
return 1;
}
if(Spielerinfo[playerid][pSpawnChange] == 2)
{
SetPlayerPos(playerid,2236.5122,-1159.3638,1029.7969);//Die Position, im Hotel Interior, wo der spieler spawnen soll, wenn er dort eingemietet ist
SetPlayerFacingAngle(playerid, 270);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerHealth(playerid,100);
SetPlayerInterior(playerid,15);//Setzt den Spieler in den Interior des Hotels
UnFreezePlayer(playerid);
print("Spawn Hotel");
}
return 1;
}
Alles anzeigen
Diese Funktionen sind bereits vorhanden.
Nichts desto trotz.
einmal korrekt durchlesen
Ach herje... ich steige bei solchem nicht gut durch, zu wirr warr das ganze, bevorzuge kleine Funktionen, die nacheinander aufgerufen werden. Sorry.
was braucht ihr noch ??
ich habe immer noch das Problem das ich nachen einloggen 10 sekunden runter fliege
ich bitte um hilfe
Füge mal das hinzu und schau was ausgegeben wird in der Log:
Function SetPlayerSpawn(playerid)
{
new getCount = GetTickCount();
if(IsPlayerConnected(playerid))
{
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Hans", true))
{
new string[128];
SetPlayerColor(playerid,GELB);
format(string,sizeof(string),"{FFFF00}Regional Express\n{FFFFFF}Zugfahrer/in: {00FFFF}%s",botname);
zuginfo[GetPlayerVehicleID(playerid)] = Create3DTextLabel(string,BUSuTAXIDUTYFARBE,0.0,0.0,0.0,25.0,0,0);
Attach3DTextLabelToVehicle(zuginfo[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.0,0.0,0.0);
Spielerinfo[playerid][pHealth] = 50;
Spielerinfo[playerid][pLevel] = 100;
Spielerinfo[playerid][pAdmin] = 11;
Spielerinfo[playerid][pCarLic] = 1;
Spielerinfo[playerid][pNewLic] = 1;
Spielerinfo[playerid][pFlyLic] = 1;
Spielerinfo[playerid][pBoatLic] = 1;
Spielerinfo[playerid][pGunLic] = 1;
Spielerinfo[playerid][pLKWLic] = 1;
Spielerinfo[playerid][pRollerLic] = 1;
Spielerinfo[playerid][pTaxiLic] = 1;
Spielerinfo[playerid][pMotoLic] = 1;
Spielerinfo[playerid][pAbschlepperschein] = 1;
Spielerinfo[playerid][pChar] = 255;
Spielerinfo[playerid][pJob] = 14;
Spielerinfo[playerid][pPnumber] = 0;
PutPlayerInVehicle(playerid, car_zug, 0);
}
}
if(Spielerinfo[playerid][pTut] == 0 && !IsPlayerNPC(playerid))
{
SetPlayerCameraPos(playerid, 1668.0225, -1262.5676, 253.6837);
SetPlayerCameraLookAt(playerid, 1667.9021, -1263.5598, 253.2037);
SetPlayerPos(playerid,1667.0026,-1247.3528,233.3750);
SetPlayerFacingAngle(playerid, 181.4726);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
FreezePlayer(playerid);
AtRegestration[playerid] = 1;
RegistrationStep[playerid] = 1;
//SendClientMessage(playerid, COLOR_YELLOW, " ");
//SendClientMessage(playerid, COLOR_LIGHTRED, " Bist du Männlich oder Weiblich?");
ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"{FFFFFF}Wähle dein {00FFFF}Geschlecht {FFFFFF}aus","{FFFFFF}Gehörst du des {00FFFF}Männlichen {FFFFFF}oder {00FFFF}Weiblichen {FFFFFF}Geschlechts an?","Männlich","Weiblich");
//----------------
//ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Bist du Männlich oder Weiblich?","Erstellen","Abbrechen");
//ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login to your account",s,"Login","Cancel");
// ShowMenuForPlayer(Geschlecht,playerid);
}
}
new rand;
new house = Spielerinfo[playerid][pPhousekey];
if(PlayerPaintballing[playerid] != 0)
{
ResetPlayerWeapons(playerid);
UnFreezePlayer(playerid);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 24, 999);
rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
print("Spawn Paintball");
return 1;
}
if(KnastTime[playerid] > 0)
{
SetPlayerToKnast(playerid,Knast[playerid]);
SetPlayerHealth(playerid,100);
SetCameraBehindPlayer(playerid);
UnFreezePlayer(playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, " Flüchten bringt nichts, zurück in die Zelle!");
TextDrawShowForPlayer(playerid, Knastzeit[0]);
TextDrawShowForPlayer(playerid, Knastzeit[1]);
TextDrawShowForPlayer(playerid, Knastzeit[2]);
TextDrawShowForPlayer(playerid, Knastzeit[3]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][0]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][1]);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,1);
ResetPlayerWeapons(playerid);
print("Spawn Zelle");
return 1;
}
if(Spielerinfo[playerid][pJailed] == 1)
{
new krand = random(sizeof(RandomKnast));
SetPlayerPos(playerid, RandomKnast[krand][0], RandomKnast[krand][1],RandomKnast[krand][2]);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
UnFreezePlayer(playerid);
SetPlayerHealth(playerid,100);
TogglePlayerControllable(playerid, 1);
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid,1);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, "Flüchten bringt nichts, zurück in die Zelle!");
TextDrawShowForPlayer(playerid, Knastzeit[0]);
TextDrawShowForPlayer(playerid, Knastzeit[1]);
TextDrawShowForPlayer(playerid, Knastzeit[2]);
TextDrawShowForPlayer(playerid, Knastzeit[3]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][0]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][1]);
print("Spawn Zelle");
return 1;
}
if(Spielerinfo[playerid][pJailed] == 2)
{
FreezePlayer(playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, "Du wurdest wieder ins Alcatraz Gefängnis gebracht!");
TextDrawShowForPlayer(playerid, Knastzeit[0]);
TextDrawShowForPlayer(playerid, Knastzeit[1]);
TextDrawShowForPlayer(playerid, Knastzeit[2]);
TextDrawShowForPlayer(playerid, Knastzeit[3]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][0]);
PlayerTextDrawShow(playerid,Knastminuten[playerid][1]);
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid, 1);
ResetPlayerWeapons(playerid);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
new krand = random(sizeof(RandomalcaKnast));
SetPlayerPos(playerid, RandomalcaKnast[krand][0], RandomalcaKnast[krand][1],RandomalcaKnast[krand][2]);
UnFreezePlayer(playerid);
print("Spawn Alcatraz Gefängnis");
return 1;
}
if(Spielerinfo[playerid][pGangJailed] == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, -368.4912,-1429.0795,25.7266);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im GangJail!");
print("Spawn GangJail");
return 1;
}
if(Spielerinfo[playerid][pSpawnChange] == 3)
{
if (Spielerinfo[playerid][pMember] == 1 || Spielerinfo[playerid][pLeader] == 1)// LS Police spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,1556.4081,-1668.2754,3004.4851);
ResetPlayerWeapons(playerid);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerVirtualWorld(playerid,1);
SetPlayerInterior(playerid,1);
UnFreezePlayer(playerid);
print("Spawn LSPD");
return 1;
}
if (Spielerinfo[playerid][pMember] == 2 || Spielerinfo[playerid][pLeader] == 2)//Army spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 235.3255,1919.5337,17.6481);
SetPlayerFacingAngle(playerid,140.1929);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Army");
return 1;
}
if (Spielerinfo[playerid][pMember] == 3 || Spielerinfo[playerid][pLeader] == 3) //Feuerwehr LS Spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,1738.1647,-1116.9089,3832.2930);
SetPlayerFacingAngle(playerid,90.0000);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Feuerwehr");
return 1;
}
if (Spielerinfo[playerid][pMember] == 4 || Spielerinfo[playerid][pLeader] == 4)//Medicspawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1183.5485,-1383.0797,13.3888);
SetPlayerFacingAngle(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Medic");
return 1;
}
if (Spielerinfo[playerid][pMember] == 5 || Spielerinfo[playerid][pLeader] == 5) //Fahrschule spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,-2021.8616,-100.9839,35.1641);
SetPlayerFacingAngle(playerid,70);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Fahrschule");
return 1;
}
if (Spielerinfo[playerid][pMember] == 6 || Spielerinfo[playerid][pLeader] == 6) //Oamt spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,919.6495,-1239.6622,17.0559);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn Oamt");
return 1;
}
if(Spielerinfo[playerid][pLeader] == 7)//Präsident spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1290.6393,-791.4279,1089.9375);
SetPlayerInterior(playerid, 5);
SetPlayerVirtualWorld(playerid, 4);
UnFreezePlayer(playerid);
print("Spawn Präsident");
return 1;
}
if(Spielerinfo[playerid][pMember] == 7)//Bodyguard spawn
{
SetPlayerToTeamColor(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1274.0594,-790.8364,1089.9316);
SetPlayerInterior(playerid, 5);
SetPlayerVirtualWorld(playerid, 4);
UnFreezePlayer(playerid);
print("Spawn Präsident");
return 1;
}
if (Spielerinfo[playerid][pMember] == 8 || Spielerinfo[playerid][pLeader] == 8) //Hitman spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid, 935.3979,1726.9061,-15.6196);
SetPlayerFacingAngle(playerid,75.3922);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Hitman");
return 1;
}
if (Spielerinfo[playerid][pLeader] == 9)//Leader Yakuza
{
SetPlayerToTeamColor(playerid);// fraktions farbe
SetPlayerVirtualWorld(playerid,0);// virtuelle welt
SetPlayerPos(playerid,935.3979,1726.9061,-15.6196);//spawn koordinaten
SetPlayerFacingAngle(playerid,115.0242);
SetPlayerInterior(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Yakuza");
return 1;
}
if(Spielerinfo[playerid][pMember] == 9)//Member Yakuza
{
SetPlayerToTeamColor(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,935.3979,1726.9061,-15.6196);//spawn koordinaten
SetPlayerFacingAngle(playerid,115.0242);
SetPlayerInterior(playerid, 0);
if(Spielerinfo[playerid][pRank] == 1 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 122);
}
else if(Spielerinfo[playerid][pRank] == 2 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 123);
}
else if(Spielerinfo[playerid][pRank] == 3 || Spielerinfo[playerid][pRank] == 4 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 294);
}
else if(Spielerinfo[playerid][pRank] == 5 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 186);
}
else if(Spielerinfo[playerid][pRank] >= 6 && Spielerinfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 228);
}
else if(Spielerinfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 169);
}
UnFreezePlayer(playerid);
print("Spawn Yakuza");
return 1;
}
if (Spielerinfo[playerid][pMember] == 10 || Spielerinfo[playerid][pLeader] == 10) //GROOVE STREET FAMILIY
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2495.3064,-1703.9044,1018.3438);
SetPlayerFacingAngle(playerid,90.0000);
SetPlayerInterior(playerid,3);
Spielerinfo[playerid][pInt] = 3;
SetPlayerVirtualWorld(playerid,1);
UnFreezePlayer(playerid);
print("Spawn GROOVE");
return 1;
}
if (Spielerinfo[playerid][pMember] == 11 || Spielerinfo[playerid][pLeader] == 11) //BALLAS GANG
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
SetPlayerFacingAngle(playerid,281.6475);
SetPlayerInterior(playerid,8);
Spielerinfo[playerid][pInt] = 8;
SetPlayerVirtualWorld(playerid,6);
UnFreezePlayer(playerid);
print("Spawn BALLAS");
return 1;
}
if (Spielerinfo[playerid][pMember] == 12 || Spielerinfo[playerid][pLeader] == 12) //Los Santos Vagos
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
SetPlayerVirtualWorld(playerid,8);
SetPlayerFacingAngle(playerid,88.9785);
SetPlayerInterior(playerid,8);
Spielerinfo[playerid][pInt] = 8;
if(Spielerinfo[playerid][pRank] >= 0 && Spielerinfo[playerid][pRank] <= 2)
{
SetPlayerSkin(playerid, 110);
}
else if(Spielerinfo[playerid][pRank] >= 3 && Spielerinfo[playerid][pRank] <= 5)
{
SetPlayerSkin(playerid, 108);
}
else if(Spielerinfo[playerid][pLeader] == 12)
{
SetPlayerSkin(playerid, 109);
}
UnFreezePlayer(playerid);
print("Spawn Vagos");
return 1;
}
if ((gTeam[playerid]) == 1)
{
SetPlayerToTeamColor(playerid);
rand = random(sizeof(gMedPlayerSpawns));
SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
Spielerinfo[playerid][pInt] = 0;
UnFreezePlayer(playerid);
print("Spawn MedPlayerSpawns");
return 1;
}
}
if(Spielerinfo[playerid][pSpawnChange] == 0){
if(Spielerinfo[playerid][pOrigin] == 1 || Spielerinfo[playerid][pOrigin] == 2 || Spielerinfo[playerid][pOrigin] == 3)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,477.8253,-1499.5513,20.4956);//hieromg
SetPlayerFacingAngle(playerid,279.4515);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
UnFreezePlayer(playerid);
print("Spawn Zivispawn");
return 1;
}
}
if(Spielerinfo[playerid][pSpawnChange] == 1 && house != 255)
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
Spielerinfo[playerid][pLocal] = house;
Spielerinfo[playerid][pInt] = HouseInfo[house][hInt];
SetPlayerVirtualWorld(playerid,house);
UnFreezePlayer(playerid);
print("Spawn Haus");
return 1;
}
if(Spielerinfo[playerid][pSpawnChange] == 2)
{
SetPlayerPos(playerid,2236.5122,-1159.3638,1029.7969);//Die Position, im Hotel Interior, wo der spieler spawnen soll, wenn er dort eingemietet ist
SetPlayerFacingAngle(playerid, 270);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerHealth(playerid,100);
SetPlayerInterior(playerid,15);//Setzt den Spieler in den Interior des Hotels
UnFreezePlayer(playerid);
print("Spawn Hotel");
}
printf("Time taken to execute SetPlayerSpawn: %d", GetTickCount() - getCount);
return 1;
}
Function OnPlayerSpawn(playerid)
{
new getCount = GetTickCount();
StopAudioStreamForPlayer(playerid);
SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
Spielerinfo[playerid][StonedHP] = 0.0;
FeuerDuty[playerid] = 0;
OnDuty[playerid] = 0;
JobDuty[playerid] = 0;
FonDuty[playerid] = 0;
// untere leiste
TextDrawShowForPlayer(playerid, UntereLeiste0);
TextDrawShowForPlayer(playerid, UntereLeiste1);
TextDrawShowForPlayer(playerid, UntereLeiste2);
if(GetPlayerACHealth(playerid) == 0)
{
SetPlayerACHealth(playerid,10.00);
}
for(new i = 1;i< 14;i++) GivePlayerWeapon(playerid,g_weapon[playerid][i-1],g_ammo[playerid][i-1]);
if(GeldwaschCP[playerid] == 1){
SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.000000, -0.220224, 0.000000, 1.166815, 85.423309, 0.000000, 1.000000, 1.000000, 1.000000 ); //Geldsack an den Spieler hängen
SendClientMessage(playerid,0xAA3333AA,"Du musst das Geld noch Waschen Lassen!");
SetPlayerCheckpoint(playerid,-2491.6199,2363.2437,10.2727,2.0);
GeldwaschCP[playerid] = 1;}
if(GeldwaschCP[playerid] == 2){
SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.000000, -0.220224, 0.000000, 1.166815, 85.423309, 0.000000, 1.000000, 1.000000, 1.000000 ); //Geldsack an den Spieler hängen
SendClientMessage(playerid,0xAA3333AA,"Du musst das Geld noch Waschen Lassen!");
SetPlayerCheckpoint(playerid,-2522.4043,1216.3790,37.4283,2.0);
GeldwaschCP[playerid] = 2;}
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Hans", true))
{
new string[128];
SetPlayerColor(playerid,GELB);
format(string,sizeof(string),"{FFFF00}Regional Express\n{FFFFFF}Zugfahrer/in: {00FFFF}%s",botname);
zuginfo[GetPlayerVehicleID(playerid)] = Create3DTextLabel(string,BUSuTAXIDUTYFARBE,0.0,0.0,0.0,25.0,0,0);
Attach3DTextLabelToVehicle(zuginfo[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.0,0.0,0.0);
Spielerinfo[playerid][pLevel] = 100;
Spielerinfo[playerid][pAdmin] = 11;
Spielerinfo[playerid][pCarLic] = 1;
Spielerinfo[playerid][pNewLic] = 1;
Spielerinfo[playerid][pFlyLic] = 1;
Spielerinfo[playerid][pBoatLic] = 1;
Spielerinfo[playerid][pGunLic] = 1;
Spielerinfo[playerid][pLKWLic] = 1;
Spielerinfo[playerid][pRollerLic] = 1;
Spielerinfo[playerid][pTaxiLic] = 1;
Spielerinfo[playerid][pMotoLic] = 1;
Spielerinfo[playerid][pAbschlepperschein] = 1;
Spielerinfo[playerid][pChar] = 255;
Spielerinfo[playerid][pJob] = 14;
Spielerinfo[playerid][pPnumber] = 0;
PutPlayerInVehicle(playerid, car_zug, 0);
}
}
PlayerGangZonesShow(playerid, 1);
STDPlayer[playerid] = 0;
gTeam[playerid] = Spielerinfo[playerid][pTeam]; //Set the Team
if (gTeam[playerid] == 4) //medic / criminal reset team
{
gTeam[playerid] = 3;
}
if(Spielerinfo[playerid][pTot] == 1 && Spielerinfo[playerid][pLevel] > 2 && Spielerinfo[playerid][pJailed] == 0 && Spielerinfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
SetPlayerPos(playerid, ppX, ppY, ppZ);
SetTimerEx("Spawn",1000,false,"i",playerid);
TogglePlayerControllable(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,Spielerinfo[playerid][pChar]);
return 1;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Um auf "#SERVERNAME" Spielen zu können musst du dich erst Registrieren");
FreezePlayer(playerid);
Kick(playerid);
return 1;
}
if(AtClothes[playerid] == 1)
{
Spielerinfo[playerid][pChar] = GetPlayerSkin(playerid);
Spielerinfo[playerid][pModel] = GetPlayerSkin(playerid);
AtClothes[playerid] = 0;
}
if(gTeam[playerid] == 11 && Spielerinfo[playerid][pLeader] < 1)
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Chef dieser Familie, du bist Zivilist !");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
if(gTeam[playerid] == 5)
{
if(Spielerinfo[playerid][pMember] < 1)
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Mitglied dieser Familie, du bist Zivilist !");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
}
if(gTeam[playerid] == 10)
{
if(Spielerinfo[playerid][pMember] != 8)
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Mitglied dieser Fraktion, du bist Zivilist !");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
}
if(gTeam[playerid] == 2 && !IsACop(playerid))
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Polizist!");
Spielerinfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Spielerinfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
if(gTeam[playerid] == 3)
{
if(Spielerinfo[playerid][pMember] > 0 || Spielerinfo[playerid][pLeader] > 0)
{
MedicBill[playerid] = 0;
new model = Spielerinfo[playerid][pChar];
//Member
if(Spielerinfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 2; gTeam[playerid] = 2; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 2; gTeam[playerid] = 2; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 3, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//
else if(Spielerinfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 4, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 1; gTeam[playerid] = 1; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 6, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//
else if(Spielerinfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 7, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 7; gTeam[playerid] = 7; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 8, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 10; gTeam[playerid] = 10; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 9, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 5; gTeam[playerid] = 5; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Groove Street
else if(Spielerinfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Ballas
else if(Spielerinfo[playerid][pMember] == 12) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Los Santos Vagos
//Leaders
else if(Spielerinfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 3, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }// Feuerwehr
else if(Spielerinfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 4, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 6, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }// Oamt
else if(Spielerinfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 7, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 8, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 9, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 11; gTeam[playerid] = 11; Spielerinfo[playerid][pModel] = model; }
else if(Spielerinfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Groove Street
else if(Spielerinfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Ballas
else if(Spielerinfo[playerid][pLeader] == 12) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); Spielerinfo[playerid][pTeam] = 12; gTeam[playerid] = 12; Spielerinfo[playerid][pModel] = model; }//Los Santos Vagos
//SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);
}
}
if(!gPlayerAnimLibsPreloaded[playerid])
{
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
gPlayerAnimLibsPreloaded[playerid] = 1;
}
if(Spielerinfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, Spielerinfo[playerid][pChar]); }
else { SetPlayerSkin(playerid, Spielerinfo[playerid][pModel]); }
//SetPlayerWeapons(playerid);
SetPlayerSpawn(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerToTeamColor(playerid);
PlayerFixRadio(playerid);
if(MapIconsShown[playerid] != 1)
{
MapIconsShown[playerid] = 1;
SetPlayerMapIcon(playerid, 1,1789.6616,-1121.6483,24.0859, 20, COLOR_YELLOW);//Feuerwehr Sirene
SetPlayerMapIcon(playerid, 3,1481.0009,-1770.3896,18.7958,38,COLOR_YELLOW);//Stadthalle
SetPlayerMapIcon(playerid, 4, 1544.4790,-1673.6595,13.5585, 30, COLOR_YELLOW); // LSPD
SetPlayerMapIcon(playerid, 5, -2052.7024,-101.7683,35.1641, 38, COLOR_YELLOW); // Fahrschule
SetPlayerMapIcon(playerid, 6, 1480.9323,-1767.7324,18.7958, 38, COLOR_YELLOW); // Stadthalle
SetPlayerMapIcon(playerid, 7, 1944.3260,-1772.9254,13.3906, 42, COLOR_YELLOW); // Tankstelle LS
SetPlayerMapIcon(playerid, 8, -1609.7958,-2718.2048,48.5391, 42, COLOR_YELLOW); // Tankstelle LS
SetPlayerMapIcon(playerid, 9, -2408.7590,976.0934,45.4175, 42, COLOR_YELLOW); // Tankstelle SF
SetPlayerMapIcon(playerid, 10, -1676.6323,414.0262,6.9484, 42, COLOR_YELLOW); // Tankstelle zwischen LS und SF
SetPlayerMapIcon(playerid, 11, 614.9333,1689.7418,6.6968, 42, COLOR_YELLOW); // Tankstelle LV
SetPlayerMapIcon(playerid, 12, -1327.7218,2678.8723,50.0625, 42, COLOR_YELLOW); // Tankstelle LV
SetPlayerMapIcon(playerid, 13, 1017.9830,-919.3538,42.3359, 27, COLOR_YELLOW); // FARBE NORTH
SetPlayerMapIcon(playerid, 14, 1911.2693,-1776.6720,13.3828, 27, COLOR_YELLOW); // /FARBE SOUTH
SetPlayerMapIcon(playerid, 15, 2023.4214,-2442.2095,13.5469, 27, COLOR_YELLOW); // /FARBE AIRPORT
SetPlayerMapIcon(playerid, 16, 461.5126,-1529.1906,29.9576, 12, COLOR_YELLOW); // /Arbeitsamt
SetPlayerMapIcon(playerid, 17, 1464.3953,-1028.0828,23.8281,52,COLOR_YELLOW);//Bank LS
SetPlayerMapIcon(playerid, 18, 1172.3250,-1321.6505,15.3993,22,COLOR_YELLOW);//Krankenhaus
SetPlayerMapIcon(playerid, 19, 2489.3245,-1667.5101,14.5585, 62, COLOR_YELLOW); // grove map
SetPlayerMapIcon(playerid, 20, 1995.5549,-1135.5896,25.4520, 59, COLOR_YELLOW); // Ballas map
SetPlayerMapIcon(playerid, 21, 2533.8320,-1047.7485,69.4141, 60, COLOR_YELLOW); // Vagos map
SetPlayerMapIcon(playerid, 25, 2216.8887,-1161.4492,25.7266,35,COLOR_YELLOW);//Hotel
SetPlayerMapIcon(playerid, 27, 2202.2104,2474.0771,10.8203, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 28, 2113.8049,920.1666,10.8203, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 29, 1678.5032,61.2240,38.2888, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 30, 1004.0560,-933.4848,42.1797, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 31, 1939.1482,-1773.1575,13.3828, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 32, -90.4686,-1169.2285,2.4086, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 33, -1675.0731,414.0955,7.1797, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 34, -2414.8630,975.2982,45.2969, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 35, -1609.7958,-2718.2048,48.5391, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 36, -1328.7947,2677.7437,50.0625, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 37, 1382.8003,462.5798,20.1421, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 38, 656.0778,-564.8906,16.3359, 42, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 39, 500.1981,-1359.5757,16.2711, 45, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 40, 1456.9403,-1138.0343,23.9763, 45, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 41, 2244.4800,-1664.0601,15.4766, 45, COLOR_YELLOW);
SetPlayerMapIcon(playerid, 42, 1172.3250,-1321.6505,15.3993,22,COLOR_YELLOW);//Krankenhaus
SetPlayerMapIcon(playerid, 43, 1192.8273,-924.8173,42.9004, 10,COLOR_YELLOW);//BSN
}
printf("Time taken to execute OnPlayerSpawn: %d", GetTickCount() - getCount);
return 1;
}
jetzt spawne ich garnicht mehr
hier die 2 logs
Time taken to execute OnPlayerSpawn: 0
Time taken to execute SetPlayerSpawn: 0
Dann mach mal alle paar Scriptzeilen in den Callbacks print("1"); die 1 mit 2 austauschen und das machst du den ganzen Callback, damit man sieht wo er stehen bleibt.
hier die print
[19:59:34] [connection] 89.145.1.140:64607 requests connection cookie.
[19:59:35] [connection] incoming connection: 89.145.1.140:64607 id: 1
[19:59:36] [join] GhostRider has joined the server (1:89.145.1.140)
[19:59:36] OnPlayerConnect 1
[19:59:36] OnPlayerConnect 2
[19:59:36] OnPlayerConnect 3
[19:59:58] SELECT * FROM users WHERE `Name` = 'GhostRider' AND `Password` = 'xxxxx'
[19:59:58] OnPlayerLogin 1
[19:59:58] i: 1 | weapon: 0 | ammo: 0
[19:59:58] i: 2 | weapon: 0 | ammo: 0
[19:59:58] i: 3 | weapon: 0 | ammo: 0
[19:59:58] i: 4 | weapon: 0 | ammo: 0
[19:59:58] i: 5 | weapon: 0 | ammo: 0
[19:59:58] i: 6 | weapon: 0 | ammo: 0
[19:59:58] i: 7 | weapon: 0 | ammo: 0
[19:59:58] i: 8 | weapon: 0 | ammo: 0
[19:59:58] i: 9 | weapon: 0 | ammo: 0
[19:59:58] i: 10 | weapon: 0 | ammo: 0
[19:59:58] i: 11 | weapon: 0 | ammo: 0
[19:59:58] i: 12 | weapon: 0 | ammo: 0
[19:59:58] i: 13 | weapon: 0 | ammo: 0
[19:59:58] OnPlayerLogin 3
[19:59:58] OnPlayerLogin 3
[19:59:58] OnPlayerLogin 4
[19:59:58] Spawn LSPD
[19:59:58] OnPlayerLogin 5
[20:00:04] OnPlayerLogin 6
[20:00:04] Spawn LSPD
[20:00:04] OnPlayerSpawn 1
[20:00:04] OnPlayerSpawn 3
[20:00:04] OnPlayerSpawn 4
[20:00:04] Spawn LSPD
Alles anzeigen
geht er bis zum Ende oder stoppt er irgendwo? Man braucht dann auch die callbacks