[Pomoc]Komanda /izbaci i /gov


Započeo Garic, April 02, 2012, 13:37:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:NX
Detaljan opis problema:Pa znači kad sam u organizaciji nekoj legalnoj nemogu gov da koristim nego tek kad sam rank 5 kako namjestiti da samo lider može?I onda kad si postaviš nekog lidera neke org i ti opet moreš sve raditii kao u prošlog org jer nisi izbacit a komanda izbaci mi nešta ne radi.
Dio skripte:Komanda /gov:
CMD:government(playerid, params[])
	{
		new string[128];
		new sendername[MAX_PLAYER_NAME];
		new  idx;
	    if(IsPlayerConnected(playerid))
	    {
			  if(PlayerInfo[playerid][pMuted] == 1)
			{
					format(string, sizeof(string), " {FFFF80}Noxicus| {FF4444}Ne mozes pricati jer si utisan! Preostalo vrijeme: {FFFF80}%d sekundi(%d minuta)", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60)+1); 
				SCM(playerid, 0xFF4444FF, string);
				return 1;
			}
			if(gTeam[playerid] != 2)
			{
			    SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac !");
			    return 1;
			}
			if(PlayerInfo[playerid][pLeader] < 1)
			{
			    SendClientMessage(playerid, COLOR_GREY, "   Moras biti rank 5 da bi mogao koristit ovu komandu !");
			    return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(params);
			while ((idx < length) && (params[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = params[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} (/gov)ernment [text]");
				return 1;
			}
			SendClientMessageToAll(0x4141FFFF, "|___________{B9B9FF} Vladine Vijesti{4141FF} ___________|");
			format(string, sizeof(string), "{0000FF}Nacelnik %s: {B9DCED}%s", sendername, result);
			SendClientMessageToAll(COLOR_DBLUE, string);
		}
		return 1;
	}
	COMMAND:gov(playerid, params[])
{
  return cmd_government(playerid, params);
}

Komanda /izbaci:
CMD:izbaci(playerid, params[])
	{
		new sendername[MAX_PLAYER_NAME];
		new giveplayer[MAX_PLAYER_NAME];
		new string[128];
		 
	    if(IsPlayerConnected(playerid))
	    {
			new idx;
			temp = strtok(params, idx);
			if(!strlen(temp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /izbaci {959561}[ID/DioImena] {838361}");
				return 1;
			}
			new para1;
			para1 = ReturnUser(temp);
			if (PlayerInfo[playerid][pLeader] >= 1)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
					    if (PlayerInfo[para1][pMember] > 1)
					    {
							if(PlayerInfo[playerid][pLeader] == PlayerInfo[para1][pMember])
							{
							GetPlayerName(para1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							
							format(string, sizeof(string), "* Izbacen si iz svoje Mafije/Org od lidera: %s.", sendername);
							SendClientMessage(para1, COLOR_LIGHTBLUE, string);
							SendClientMessage(para1, COLOR_LIGHTBLUE, "* Ponovo 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 svoje Org/Mafije.", giveplayer);
							SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
							}
							else return SCM(playerid, COLOR_RED, "Ne mozes izbaciti igraca koji nije u tvojoj org/mafiji!");
						}
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten(Lideri samo)!");
			}
		}
		return 1;
	}

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