Hallo alle,
Unser Server crasht komischerweise bei CMD´s und es werden immer mehr die wir finden .... Wir wissen auch nicht wieso Das ist einfach nur komisch.... Der Server crasht bei /edit /invite /kick bis jetzt... Aber die CMD´s sind nicht verbuggt wir haben schon nachgesehen aber was ist da los?
Hier mal die Script abschnitte:
//----------------------------------[Kick]------------------------------------------------
if(strcmp(cmd, "/kick", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /kick [playerid] [Grund]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /kick [playerid] [Grund]");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
{
SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Spieler nicht kicken, da er ein höheres Adminlevel hat als du!");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s wurde von %s gekickt, Grund: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
KickLog(string);
format(string, sizeof(string), "AdmCmd: %s wurde von %s gekickt, Grund: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(giveplayerid);
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/invite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /invite [spielerid/teildesnamens]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
{
if(PlayerInfo[para1][pJob] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "Spieler kann nicht eingeladen werden, weil er einen Job hat!");
return 1;
}
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Polizei"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Nationalgarde"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Feuerwehr/Sanitäter"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yuzuki"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 258); }
else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agentur"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127); }
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxiunternehmen"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Fahrlehrer"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Grove Street"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Terroristen"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270); } //Skin Ändern!
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("AdmCmd: %s hat %s eingeladen um %s beizutreten.", sendername, giveplayer, ftext);
format(string, sizeof(string), "Du bist %s beigetreten, du wurdest vom Leader %s eingeladen", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Du hast %s eingeladen %s beizutreten.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(para1, 0);
SelectChar[para1] = 255;
SelectCharID[para1] = PlayerInfo[para1][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
SendClientMessage(para1, COLOR_LIGHTRED, "* Verwende 'next' um deinen Charakter zu wählen.");
SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den Charakter gefunden hast, den du benutzen willst, tippe 'done'.");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler wird gesucht / ist schon in einem Team / ist schon ein Familienmitglied.");
return 1;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Dir ist es nicht erlaubt, diesen Befehl zu benutzen (nur für Leader)!");
}
}
return 1;
}
Hoffe ihr könnt uns helfen
//Edit befehl war zu lange den Poste ich aber auch noch
MFG alex