SA-MP Forums Archive
Need HELP! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need HELP! (/showthread.php?tid=112761)



Need HELP! - sggassasin - 10.12.2009

hi i need some help i have a pice of code that lets me give someone an admin but it stays only on level 1 so could someone help because i need it to be able to do up to 5 so if someone could help that would be great

here is my code...



Код:
if (strcmp(cmd, "/giveadmin", true) ==0 )
	{
  new giveplayerid;
	if(PlayerInfo[playerid][Admin] >= 5)
	    {
 	if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /giveadmin[playerid] ");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
		 	if (IsPlayerConnected(giveplayerid))
			{
			  
        PlayerInfo[giveplayerid][Admin] = 1;
        SendClientMessage(giveplayerid, COLOR_GRAD1, "You Have been Given Admin");
			}
			else
			{
       SendClientMessage(giveplayerid, COLOR_GRAD1, "Player Is Not On The Sever");
			}

		}
		
	}
 	else
	{
 	SendClientMessage(giveplayerid, COLOR_GRAD1, "You Are Not Admin");
	}
	return 1;
	}