Hi, Com ich habe eine Frage.
Bei OnPlayerSpawn soll der Spieler wenn er gebannt ist, nicht in der Basis spawnen aber irgendwie tut er es doch?
Ist eine Klammer falsch gesetzt oder was habe ich falsch gemacht?
public OnPlayerSpawn(playerid)
{
SetPlayerScore(playerid, sSpieler[playerid][Adminlevel]);
ResetPlayerMoney(playerid);
ResetPlayerWeapons(playerid);
StopAudioStreamForPlayer(playerid); // Stop the audio stream
SpielerLaden(playerid);
TextDrawHideForPlayer(playerid, NGRSERVER);
if(sSpieler[playerid][Banned] == 1)
{
SetTimerEx("rekick",60,0,"i",playerid);
SetPlayerInterior(playerid,0);
SetPlayerCameraPos(playerid, -2281.7173,82.0833,74.7330);
SetPlayerCameraLookAt(playerid, -2299.2324,119.7863,74.7330);
TogglePlayerControllable(playerid,0);
TextDrawShowForPlayer(playerid,BANNED);
TextDrawHideForPlayer(playerid, NEULING);
new IDName[MAX_PLAYER_NAME];
GetPlayerName(playerid,IDName,sizeof(IDName));
new Pfad[60];
format(Pfad,60,"/Spieler/%s.txt",IDName);
//dini_Get(Pfad,"Bangrund"));
new str[900];
format(str,sizeof(str),"{FFFFFF}Du wurdest von {FF9933}%s{FFFFFF} gebannt, Grund: {FF9933}%s{FFFFFF}\n\nWenn du dich ungerecht behandelt fühlst,\noder du gar nichts gemacht hast, bitten wir dich im Forum\neinen Entbannantrag zu schreiben!\n\n{FF0000}>>Im Falle das du gehackt hast, besteht keine Chance auf einen Entbann!\n\n{FFFFFF}Forum: {FF9933}ngr.epicmine.eu",dini_Get(Pfad,"Gebanntvon"),dini_Get(Pfad,"Bangrund"));
ShowPlayerDialog(playerid, DIALOG_GEBANNT, DIALOG_STYLE_MSGBOX, "Du wurdest gebannt!",str,"OK","");
}
if(sSpieler[playerid][Banned] == 2)
{
ShowPlayerDialog(playerid, DIALOG_GEBANNT, DIALOG_STYLE_MSGBOX, "Fehlermeldung", "{FFFFFF}Dein Benutzeraccount wurde automatisch vom {FF9933}Server{FFFFFF} gesperrt!\n\nDies kann Gründe haben, das du unerlaubte Modifikationen benutzt hast!\n\nWenn dich die Server-Guard ungerecht gebannt hat\nbitten wir dich im Forum\neinen Entbannantrag zu schreiben!\n\nIm Falle das du wirlich gehackt hast, besteht keine Chance auf einen Entbann!\n\nForum: {FF9933}ngr.epicmine.eu","OK","");
//SetTimer("publicBan", 100, 0);
SetTimerEx("reban",100,0,"i",playerid);
}
else
{
if(sSpieler[playerid][Fraktion] == 0)
{
SetPlayerColor(playerid, 0xFFFFFF00); //Normal/Weiss
SetPlayerPos(playerid,-2764.9133,375.7186,6.3426);
//SendClientMessage(playerid,COLOR_GREEN,"[Spawn] {FFFFFF}Du bist am Zivilistenspawn gespawnt!");
SetPlayerArmour(playerid, 100);
//SetPlayerSkin(playerid, 26);
SetPlayerSkin(playerid, sSpieler[playerid][Skin]); //26
SetPlayerFacingAngle( playerid, 267.25 ); //Player faces north
SetPlayerInterior(playerid,0);
if(sSpieler[playerid][Tutorial] == 0)
{
//PlayAudioStreamForPlayer(playerid, "");
//SendClientMessage(playerid,COLOR_WHITE,"---------------------------------------------------------------------------------------");
//SendClientMessage(playerid,NGR,"Wikommen auf New Generation Roleplay!");
//SendClientMessage(playerid,NGR,"Um anzufangen, mache bitte erst einmal das Tutorial!");
//SendClientMessage(playerid,NGR,"Dazu laufe einfach in den roten Checkpoint!");
//SendClientMessage(playerid,NGR,"Falls du wärend des Tutorials fragen hast, kannst du diese mit /sup stellen!");
//SendClientMessage(playerid,NGR,"Dazu laufe einfach in den roten Checkpoint!");
//SetPlayerCheckpoint(playerid, -2716.2625,376.1808,4.3737, 4.0);
SendClientMessage(playerid,NGR,"Wikommen auf New Generation Roleplay!");
SendClientMessage(playerid,COLOR_YELLOW,"Es folgt ein kleines Tutorial!");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
ClearPlayerChat(playerid);
TogglePlayerControllable(playerid,0);
new name[MAX_PLAYER_NAME+1], string[219+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Wilkommen, {0087FF}%s{FFFFFF} schön das du auf unseren Roleplay-Server gekommen bist!", name);
SendClientMessage(playerid,COLOR_WHITE,string);
SendClientMessage(playerid,COLOR_WHITE,"Es werden dir nun die Grundsachen erklärt!");
GameTextForPlayer(playerid, "~w~Wikommen in San Fierro!", 4000, 3);
TogglePlayerSpectating(playerid, 1);
format(string, sizeof(string), "~g~Garcia");
GameTextForPlayer(playerid, string, 5000, 1);
//InterpolateCameraLookAt(playerid, -2514.7705,-135.6561,100.6361, -2118.6309,790.5685,173.9065, 40000, CAMERA_MOVE);
InterpolateCameraPos(playerid, -2514.7705,-135.6561,100.6361, -2118.6309,790.5685,173.9065, 10000, CAMERA_MOVE);
ImTutorial[playerid] = 1;
//TogglePlayerControllable(playerid,0);
SetTimerEx("TutSkip1",10000,0,"i",playerid);
}
return 1;
}
//return 1;
}
{
if(sSpieler[playerid][Fraktion] == 1)
{
SetPlayerPos(playerid,227.1842,121.8995,1010.2188);
//SendClientMessage(playerid,COLOR_GREEN,"[Spawn] {FFFFFF}Du bist im SFPD gespawnt!");
SetPlayerFacingAngle(playerid,273.0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, sSpieler[playerid][Skin]); //280
SetPlayerInterior(playerid,10);
return 1;
}
if(sSpieler[playerid][Fraktion] == 2)
{
SetPlayerPos(playerid,1491.6820,1307.1128,1093.2891);
SendClientMessage(playerid,COLOR_GREEN,"[Spawn] {FFFFFF}Du bist im Ordnungsamt gespawnt!");
//SetPlayerFacingAngle(playerid,273.0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, sSpieler[playerid][Skin]); //71
SetPlayerInterior(playerid,3);
return 1;
}
if(sSpieler[playerid][Fraktion] == 3)
{
SetPlayerPos(playerid,1491.6820,1307.1128,1093.2891);
SendClientMessage(playerid,COLOR_GREEN,"[Spawn] {FFFFFF}Du bist in der Fahrschule gespawnt!");
//SetPlayerFacingAngle(playerid,273.0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, sSpieler[playerid][Skin]);
SetPlayerInterior(playerid,3);
}
if(sSpieler[playerid][Fraktion] ==4)
{
SetPlayerPos(playerid,1491.6820,1307.1128,1093.2891);
SendClientMessage(playerid,COLOR_GREEN,"[Spawn] {FFFFFF}Du bist in San Treafik!");
//SetPlayerFacingAngle(playerid,273.0);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, sSpieler[playerid][Skin]);
SetPlayerInterior(playerid,3);
}
if(sSpieler[playerid][Fraktion] == 5)
{
SetPlayerPos(playerid,-2530.7756,-701.0938,139.3203);
SendClientMessage(playerid,COLOR_GREEN,"[Spawn] {FFFFFF}Du bist in der Nachrichtenzentrale gespawnt!");
//SetPlayerFacingAngle(playerid,273.0);
SetPlayerSkin(playerid, sSpieler[playerid][Skin]);
SetPlayerInterior(playerid,0);
//return 1;
}
if(sSpieler[playerid][Fraktion] == 7)
{
SetPlayerPos(playerid,-2159.8193,646.1214,1057.5861);
SendClientMessage(playerid,COLOR_GREEN,"[Spawn] {FFFFFF}Du bist in der YAK gespawnt!");
//SetPlayerFacingAngle(playerid,273.0);
SetPlayerSkin(playerid, sSpieler[playerid][Skin]);
SetPlayerInterior(playerid,1);
//return 1;
}
if(sSpieler[playerid][Adminprison] >= 1)
{
new knastmessage[128];
SendClientMessage(playerid,0xFF8200FF,"-------------------------------------------------[Adminprison]-------------------------------------------------");
new jailtime = sSpieler[playerid][Adminprison];
format(knastmessage, sizeof(knastmessage), "[Adminprison] {FFFFFF}Du bist noch für %d Minute(n) im {FF0000}Adminprison!",jailtime);
SendClientMessage(playerid, 0xFF8200FF,knastmessage);
SetPlayerPos(playerid,-2302.9690,1926.7751,7.0480);
//SetTimer("ajailtimer", 10, 0);
SetTimerEx("ajailtimer",10,0,"i",playerid);
}
if(sSpieler[playerid][Jailtime] >= 1)
{
new knastmessage[128];
SendClientMessage(playerid,0xFF8200FF,"-------------------------------------------------[Alcatraz]-------------------------------------------------");
new jailtime = sSpieler[playerid][Jailtime];
format(knastmessage, sizeof(knastmessage), "[KNAST] {FFFFFF}Du bist noch für %d Minute(n) im {FF0000}Staatsgefängnis {0087FF}San Andreas!",jailtime);
SendClientMessage(playerid, 0xFF8200FF,knastmessage);
SetPlayerPos(playerid,-2302.9690,1926.7751,7.0480);
//SetTimer("jailtimer", 10, 0);
SetTimerEx("jailtimer",10,0,"i",playerid);
//SetTimer("alcatimer", 10, 0);
//SetTimer("startalcatimer", 1000, 0);
SetTimerEx("startalcatimer",1000,0,"i",playerid);
}
if(sSpieler[playerid][Gangjail] == 1)
{
new knastmessage[128];
SendClientMessage(playerid,0xFF8200FF,"-------------------------------------------------[Gangjail]-------------------------------------------------");
format(knastmessage, sizeof(knastmessage), "[GANGJAIL] {FFFFFF}Du bist noch im Gangjail!");
SendClientMessage(playerid, 0xFF8200FF,knastmessage);
SetPlayerPos(playerid,-1103.1908,-601.8248,32.0078);
SetPlayerInterior(playerid, 0);
}
} //return 1;
}
Danke im Voraus