[Pomoc]Lideri

Započeo Tony_Easy, Januar 25, 2011, 01:38:39 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

evo ovako imam jedan problem neznam sta nevalja kada sam lider pd a druig igrac isto lider ballasa ja njega mogu /uninvite a ja sam lider pd a on ballasa kako je to moguce jel moze neko rec problem evo ovo mi stoji u gm


UNINVITE nezz di je problem
//----------------------------------[UNINVITE]------------------------------------------------
if(strcmp(cmd, "/uninvite", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /uninvite [playerid/DioImena]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
   if(IsPlayerConnected(para1))
   {
       if(para1 != INVALID_PLAYER_ID)
       {
   if (PlayerInfo[para1][pMember] > 0)
   {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
printf("AdmCmd: %s je izbacio iz organizacije %s.", sendername, giveplayer);
format(string, sizeof(string), "* Izbacen si iz organizacije od strane leadera %s.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
SendClientMessage(para1, COLOR_LIGHTBLUE, "* Sad si civil.");
               gTeam[para1] = 3;
PlayerInfo[para1][pTeam] = 3;
PlayerInfo[para1][pMember] = 0;
PlayerInfo[para1][pRank] = 0;
PlayerInfo[para1][pChar] = 0;
new rand = random(sizeof(CIV));
SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[para1][pModel] = CIV[rand];
MedicBill[para1] = 0;
SpawnPlayer(para1);
format(string, sizeof(string), "   Izbacio si %s iz organizacije.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi autoriziran za koristenje ove komande!");
}
}
return 1;
}





ovo je za makeleader
COMMAND:makeleader(playerid,params[])
{
new
id,
level,
otext[50],
ime[MAX_PLAYER_NAME],
ime2[MAX_PLAYER_NAME],
string[128];
if (sscanf(params, "ud", id,level)) SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /makeleader [ID] [1-11]");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_GRAD2, "[ERROR]: Igrac nije online.");
else
{
if(level > 12 || level < 0) { SCM(playerid,COLOR_GRAD4,"[ERROR]: Minimalno 0 i maximalno 11."); return 1; }
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
           if(level == 0) { PlayerInfo[id][pChar] = 17; otext = "nista"; PlayerInfo[id][pTeam] = 0;}
else if(level == 1) { PlayerInfo[id][pChar] = 288; otext = "LS-PD"; }
else if(level == 2) { PlayerInfo[id][pChar] = 286; otext = "FBI";}
else if(level == 3) { PlayerInfo[id][pChar] = 287; otext = "National Gurad";}
else if(level == 4) { PlayerInfo[id][pChar] = 122; otext = "Salvatores"; }
else if(level == 5) { PlayerInfo[id][pChar] = 113; otext = "Nuestra Familia"; }
else if(level == 6) { PlayerInfo[id][pChar] = 120; otext = "Yakuza"; }
else if(level == 7) { PlayerInfo[id][pChar] = 147; otext = "Gradonacelnik"; }
else if(level == 8) { PlayerInfo[id][pChar] = 294; otext = "Hitman"; }
else if(level == 9) { PlayerInfo[id][pChar] = 227; otext = "Novinar"; }
else if(level == 10){ PlayerInfo[id][pChar] = 61;  otext = "Taxi Club"; }
else if(level == 11){ PlayerInfo[id][pChar] = 106; otext = "Grove Street"; }
else if(level == 12){ PlayerInfo[id][pChar] = 102; otext = "Ballas"; }
PlayerInfo[id][pLeader] = level;
PlayerInfo[id][pMember] = level;
PlayerInfo[id][pRank] = 6;
GetPlayerName(playerid, ime, sizeof(ime));
GetPlayerName(id, ime2, sizeof(ime2));
format(string, sizeof string,"Postavljen si da vodis %s | Od strane admina: %s",otext,ime);
SCM(id,COLOR_Text,string);
format(string, sizeof string,"Postavio si %s da vodi %s",ime2,otext);
SCM(playerid,COLOR_Text,string);
gTeam[id] = 10;
           PlayerInfo[id][pTeam] = 10;
           SetPlayerSkin(id, PlayerInfo[id][pChar]);
}
else
{
SCM(playerid,COLOR_GRAD4,"[ERROR]: Samo administrator moze koristiti ovu komandu.");
}
}
return 1;
}
Poslednja Izmena: Januar 25, 2011, 01:39:06 PRE PODNE od Tony_Easy