help plox
#3

soz it was a return user problem it dident find it and now i got thise code but when i use it it dont give the player admin so could you plz help




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

			}

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

there is no errors it is just not giveing them admin
Reply


Messages In This Thread
help plox - by sggassasin - 08.12.2009, 08:05
Re: help plox - by Sew_Sumi - 08.12.2009, 08:20
Re: help plox - by sggassasin - 08.12.2009, 08:37
Re: help plox - by Sew_Sumi - 08.12.2009, 08:57
Re: help plox - by sggassasin - 08.12.2009, 09:55
Re: help plox - by Sew_Sumi - 08.12.2009, 09:59
Re: help plox - by sggassasin - 08.12.2009, 10:06

Forum Jump:


Users browsing this thread: 1 Guest(s)