[Pomoc] komanda /izbaci za lidere uopce ne radi

Započeo [GU:RP] Ivica, Januar 26, 2013, 23:33:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:cyber
Detaljan opis problema:pa vako kad idem izbacit clana sa komandom izbaci uopce ne reagira tj ne radi neznam zasto evo komande
CMD:izbaci(playerid, params[])
{
if(PlayerInfo[playerid][Lider] > 0)
{
new memberID;
if (sscanf(params, "d", memberID)) return SCM(playerid, -1, "{FFAF00}Koristite: {FFFFFF}/izbaci [ID clana]");
else if (memberID < 1) return SCM(playerid, SIVA, "{F81414}[Greska!] {C3C3C3}ID clana ne smije biti manji od 1.");
gGroupKick{playerid} = true;
new memberGroup;
foreach(new playerID : Player)
{
if (!strcmp(GetName(playerID), gGroupMembers[playerid][memberID]))
{
    new string[129],hIme[2][MAX_PLAYER_NAME];
    RPIme(playerid, hIme[0]);
    RPIme(playerID, hIme[1]);
gGroupFullMembers[PlayerInfo[playerID][Clan]]--;
memberGroup = PlayerInfo[playerID][Clan];
PlayerInfo[playerID][Clan] = 0;
PlayerInfo[playerID][pRank] = 0;
PlayerInfo[playerID][pGroupKick] = 1;
gGroupKick{playerid} = false;
SCMF(playerid, SVETLOPLAVA, "Izbacili ste %s iz organizacije/mafije/bande.", hIme[1]);
format(string, sizeof(string), "Izbacen si iz organizacije/mafije/bande od Lidera: %s.", hIme[0]);
SCM(playerID, SVETLOPLAVA,string);
TogglePlayerControllable(playerID, 1);
PlayerInfo[playerID][pChar] = 0;
SetPlayerSkin(playerID, StariSkin[playerID]);
    SetPlayerToTeamColor(playerID);
    SetPlayerInterior(playerID,0);
SetPlayerFacingAngle(playerID, 90.0);
new rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerPos(playerID, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
PlayerInfo[playerID][pInt] = 0;
}
}
if (!gGroupKick{playerid})
{
ResetGroupsFile(memberGroup);
}
else if (gGroupKick{playerid})
{
new filePath[36],File:userFile;
format(filePath, sizeof(filePath), "Igraci/%s.ini", gGroupMembers[playerid][memberID]);
userFile = fopen(filePath, io_append);
if (userFile)
{
fwrite(userFile, "GroupKick=1");
fclose(userFile);
}
gGroupKick{playerid} = false;
}
}
else
SendClientMessage(playerid,GRAD2, "*** Niste ovlasteni za koristenje ove komande!");
return 1;
}

Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):


Grefku imaš ovde:
if (sscanf(params, "d", memberID)) return SCM(playerid, -1, "{FFAF00}Koristite: {FFFFFF}/izbaci [ID clana]");
else if (memberID < 1) return SCM(playerid, SIVA, "{F81414}[Greska!] {C3C3C3}ID clana ne smije biti manji od 1.");


Ako je član id 0?Šta čemo onda?


if (sscanf(params, "d", memberID)) return SCM(playerid, -1, "{FFAF00}Koristite: {FFFFFF}/izbaci [ID clana]");
else if (memberID < 0) return SCM(playerid, SIVA, "{F81414}[Greska!] {C3C3C3}ID clana ne smije biti manji od 0.");


Probaj ovako nisam siguran.


probaj videti da li tebi lepo brise sa fajla sejving sistema, mozda problem nije komanda, stvarno ne znam po cemu si radio


Postaj komandu za dodavanje članova.

Last nick: Paradox

CMD:invite(playerid, params[])
{
  new string[345],para1;
  if(sscanf(params, "d", para1)) return SendClientMessage(playerid, COLOR_GRAD2, "{FFAF00}Koristite: {FFFFFF} /invite [ID]");
  else if(PlayerInfo[para1][pLevel] < 3) return SendClientMessage(playerid, SIVA, "{F81414}[Odbijeno!] {C3C3C3}Level tog igraca je manji od 3+!");
  else if(!IsPlayerConnected(para1)) return SendClientMessage(playerid, SIVA, "{F81414}[Odbijeno!] {C3C3C3}Nepostojeci ID");
  else if(PlayerInfo[para1][Clan] == 0 && PlayerInfo[para1][Lider] == 0)
  {
new ftext[345];
  if(PlayerInfo[playerid][Lider] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policija"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
  else if(PlayerInfo[playerid][Lider] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Federalni Biro"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
  else if(PlayerInfo[playerid][Lider] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Los Santos Ballas"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 102); }
  else if(PlayerInfo[playerid][Lider] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Bolnica"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
  else if(PlayerInfo[playerid][Lider] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Ice Cold Family"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
  else if(PlayerInfo[playerid][Lider] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Terror Squad Crew"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }
  else if(PlayerInfo[playerid][Lider] == 7) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Gradonacelnik"; ChosenSkin[para1] = 171; SetPlayerSkin(para1, 171); }
  else if(PlayerInfo[playerid][Lider] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Groove Street Family"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
    else if(PlayerInfo[playerid][Lider] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN"; ChosenSkin[para1] = 187; SetPlayerSkin(para1, 187); }
    else if(PlayerInfo[playerid][Lider] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxy Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else if(PlayerInfo[playerid][Lider] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 217; SetPlayerSkin(para1, 217); }
    else if(PlayerInfo[playerid][Lider] == 12) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Yakuza"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123); }
    else if(PlayerInfo[playerid][Lider] == 13) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Underground Racers"; ChosenSkin[para1] = 29; SetPlayerSkin(para1, 29); }
    else if(PlayerInfo[playerid][Lider] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Russian Mafia"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
    else if(PlayerInfo[playerid][Lider] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
    else if(PlayerInfo[playerid][Lider] == 16) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Specijalne Jedinice"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
    else if(PlayerInfo[playerid][Lider] == 17) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Santos Vagos"; ChosenSkin[para1] = 109; SetPlayerSkin(para1, 109); }
    else
    return 1;
    new rand = random(sizeof(gInviteSpawns)),giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME];
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    PlayerInfo[para1][Clan] = PlayerInfo[playerid][Lider];
    PlayerInfo[para1][pRank] = 1;
    PlayerInfo[para1][pSpawnChange] = 5;
    printf("AdmCmd: %s je invitao %s da se pridruzi %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "Pozvani ste u Organizaciju/Mafiju Bandu %s od Lidera %s", ftext, sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "Pozvali ste %s da se pridruzi u Organizaciju/Mafiju/Bandu %s.", giveplayer,ftext);
SendClientMessage(playerid, SVETLOPLAVA, string);
SetPlayerInterior(para1,0);
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][Clan];
StariSkin[para1] = GetPlayerSkin(para1);
SelectCharPlace[para1] = 1;
OdjecaID1[para1] = 1;
new File:memberFile,filePath[36];
format(filePath, sizeof(filePath), "Clanovi/%s.ini", GetPlayerGroupName(para1));
memberFile = fopen(filePath, io_append);
if(memberFile)
{
format(filePath, sizeof(filePath), "%s\r\n", GetName(para1));
fwrite(memberFile, filePath);
}
fclose(memberFile);
gGroupFullMembers[PlayerInfo[playerid][Lider]]++;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
SendClientMessage(para1, COLOR_LIGHTRED, "* Koristi Lijevi Klik Misa za biranje skina.");
SendClientMessage(para1, COLOR_LIGHTRED, "* Kada odaberete zeljeni skin,pritisnite SHIFT.");
}
else
return SCM(playerid, GRAD2, "(greska) Taj igrac je vec u nekoj Organizaciji/Mafiji/Bandi!");
return 1;
}

Zamijeni /invite komandu sa ovom:

CMD:invite(playerid, params[])
{
  new string[345],para1;
  if(sscanf(params, "d", para1)) return SendClientMessage(playerid, COLOR_GRAD2, "{FFAF00}Koristite: {FFFFFF} /invite [ID]");
  else if(PlayerInfo[para1][pLevel] < 3) return SendClientMessage(playerid, SIVA, "{F81414}[Odbijeno!] {C3C3C3}Level tog igraca je manji od 3+!");
  else if(!IsPlayerConnected(para1)) return SendClientMessage(playerid, SIVA, "{F81414}[Odbijeno!] {C3C3C3}Nepostojeci ID");
  else if(PlayerInfo[para1][Clan] == 0 && PlayerInfo[para1][Lider] == 0)
  {
new ftext[345];
  if(PlayerInfo[playerid][Lider] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policija"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
  else if(PlayerInfo[playerid][Lider] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Federalni Biro"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
  else if(PlayerInfo[playerid][Lider] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Los Santos Ballas"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 102); }
  else if(PlayerInfo[playerid][Lider] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Bolnica"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
  else if(PlayerInfo[playerid][Lider] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Ice Cold Family"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
  else if(PlayerInfo[playerid][Lider] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Terror Squad Crew"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }
  else if(PlayerInfo[playerid][Lider] == 7) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Gradonacelnik"; ChosenSkin[para1] = 171; SetPlayerSkin(para1, 171); }
  else if(PlayerInfo[playerid][Lider] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Groove Street Family"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
    else if(PlayerInfo[playerid][Lider] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN"; ChosenSkin[para1] = 187; SetPlayerSkin(para1, 187); }
    else if(PlayerInfo[playerid][Lider] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxy Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else if(PlayerInfo[playerid][Lider] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 217; SetPlayerSkin(para1, 217); }
    else if(PlayerInfo[playerid][Lider] == 12) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Yakuza"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123); }
    else if(PlayerInfo[playerid][Lider] == 13) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Underground Racers"; ChosenSkin[para1] = 29; SetPlayerSkin(para1, 29); }
    else if(PlayerInfo[playerid][Lider] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Russian Mafia"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
    else if(PlayerInfo[playerid][Lider] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
    else if(PlayerInfo[playerid][Lider] == 16) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Specijalne Jedinice"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
    else if(PlayerInfo[playerid][Lider] == 17) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Santos Vagos"; ChosenSkin[para1] = 109; SetPlayerSkin(para1, 109); }
    else
    return 1;
    new rand = random(sizeof(gInviteSpawns)),giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME];
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    PlayerInfo[para1][Clan] = PlayerInfo[playerid][Lider];
    PlayerInfo[para1][pRank] = 1;
    PlayerInfo[para1][pSpawnChange] = 5;
    printf("AdmCmd: %s je invitao %s da se pridruzi %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "Pozvani ste u Organizaciju/Mafiju Bandu %s od Lidera %s", ftext, sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "Pozvali ste %s da se pridruzi u Organizaciju/Mafiju/Bandu %s.", giveplayer,ftext);
SendClientMessage(playerid, SVETLOPLAVA, string);
SetPlayerInterior(para1,0);
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][Clan];
StariSkin[para1] = GetPlayerSkin(para1);
SelectCharPlace[para1] = 1;
OdjecaID1[para1] = 1;
new File:memberFile,filePath[36];
format(filePath, sizeof(filePath), "Clanovi/%s.ini", GetPlayerGroupName(para1));
memberFile = fopen(filePath, io_append);
if(memberFile)
{
format(filePath, sizeof(filePath), "%s\r\n", GetName(para1));
fwrite(memberFile, filePath);
}
fclose(memberFile);
gGroupFullMembers[PlayerInfo[playerid][Lider]]++;
format(gGroupMembers[playerid][PlayerInfo[playerid][Lider]], MAX_PLAYER_NAME, GetName(para1));
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
SendClientMessage(para1, COLOR_LIGHTRED, "* Koristi Lijevi Klik Misa za biranje skina.");
SendClientMessage(para1, COLOR_LIGHTRED, "* Kada odaberete zeljeni skin,pritisnite SHIFT.");
}
else
return SCM(playerid, GRAD2, "(greska) Taj igrac je vec u nekoj Organizaciji/Mafiji/Bandi!");
return 1;
}


I probaj da li radi.

Last nick: Paradox