Hiho,
Folgendes Problem:
Es geht darum, das ich Leader hinzufügen möchte und mir da Probleme aufkommen.
Ich habe vorher die Skins eingetragen:
Code
{288},//TEAM_ADMIN
{286},{287},{70},{113},{120},{147},{294},{227},{61},{189},{50},{30},{270},{286},{100},
Dann hab ich den /makeleader Befehl umgeschrieben der ja nun anstatt 0-12 Skins 0-16 Skins hat:
Code
//----------------------------------[MAKELEADER]------------------------------------------------
if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /makeleader [ID/NAME] [Number(1-16)]);
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 16 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 16!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
{
SendClientMessage(playerid, COLOR_GREY, " That player is in a Faction / Family !");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), " Du Wurdest von Admin: %s zu Leader einer Family gemacht", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Du Hast %s Leader von einer Family gemacht (Family ID: %d).", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; }
else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //Police Force
else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //La Cosa Nostra
else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //Yakuza
else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //News Reporters
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 189; } //Driving/Flying School
else if(level == 12) { PlayerInfo[para1][pChar] = 50; } //ADAC
else if(level == 13) { PlayerInfo[para1][pChar] = 30; } //AL Qaida
else if(level == 14) { PlayerInfo[para1][pChar] = 270; } //Grove Street
else if(level == 15) { PlayerInfo[para1][pChar] = 296; } //Driving/Flying School
else if(level == 16) { PlayerInfo[para1][pChar] = 100; } //Hells Angel
gTeam[para1] = 16;
PlayerInfo[para1][pTeam] = 16;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/forceskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /forceskin [ID/NAME]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMember] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " That player is not in a Family / Force !");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You are forced to Change your Skin by Admin %s.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You have forced %s To change his Skin.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(PlayerInfo[para1][pMember] == 1) { PlayerInfo[para1][pTeam] = 5; ChosenSkin[para1] = 59; }
else if(PlayerInfo[para1][pMember] == 2) { PlayerInfo[para1][pTeam] = 6; ChosenSkin[para1] = 121; }
else if(PlayerInfo[para1][pMember] == 3) { PlayerInfo[para1][pTeam] = 7; ChosenSkin[para1] = 98; }
else if(PlayerInfo[para1][pMember] == 4) { PlayerInfo[para1][pTeam] = 8; ChosenSkin[para1] = 46; }
else if(PlayerInfo[para1][pMember] == 5) { PlayerInfo[para1][pTeam] = 9; ChosenSkin[para1] = 174; }
else if(PlayerInfo[para1][pMember] == 6) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 280; }
else if(PlayerInfo[para1][pMember] == 7) { PlayerInfo[para1][pTeam] = 2; ChosenSkin[para1] = 164; }
else if(PlayerInfo[para1][pMember] == 8) { PlayerInfo[para1][pTeam] = 10; ChosenSkin[para1] = 186; }
else { return 1; }
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, "* Use 'next' to Select the char you want to use.");
SendClientMessage(para1, COLOR_LIGHTRED, "* If you've found the Char you want to use, type 'done'.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
Alles anzeigen
So, soweit so gut, nur kommen beim Compilen jetzt folgende Errors:
Code
C:\Dokumente und Einstellungen\Luca\Desktop\Datein\Samp server\gamemodes\GFF.pwn(14934) : error 037: invalid string (possibly non-terminated string)
C:\Dokumente und Einstellungen\MeinName\Desktop\Datein\Samp server\gamemodes\GFF.pwn(14934) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\MeinName\Desktop\Datein\Samp server\gamemodes\GFF.pwn(14934) : error 017: undefined symbol "makeleader"
C:\Dokumente und Einstellungen\MeinName\Desktop\Datein\Samp server\gamemodes\GFF.pwn(14934) : fatal error 107: too many error messages on one line
Hat jemand ne Idee? Bitte dringends um Hilfe!
Mit freundlichen Grüßen
Illex