[HELP]My command doesnt work
#1

ok when i go ingame i do /aunlock and the players name but when i do dat nothing happens not even the texts pops up same thing with /alock heres my commands
Код:
	if(strcmp(cmd, "/aunlock", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] >= 3)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /aunlock [playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			  if(giveplayerid != INVALID_PLAYER_ID)
			  {
			    if(PlayerInfo[giveplayerid][pLocked] == 1)
			    {
			      PlayerInfo[giveplayerid][pLocked] = 0;
			      TogglePlayerControllable(giveplayerid, 1);
			      SendClientMessage(playerid, COLOR_YELLOW, "Account unlocked succesfuly.");
			      
			    }
			  }
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "You must be a level 3 admin to do this command.");
		}
		return 1;
	}
	if(strcmp(cmd, "/alock", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] >= 3)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /aunlock [playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			  if(giveplayerid != INVALID_PLAYER_ID)
			  {
			    if(PlayerInfo[giveplayerid][pLocked] == 0)
			    {
			      PlayerInfo[giveplayerid][pLocked] = 1;
			      TogglePlayerControllable(giveplayerid, 1);
			      SendClientMessage(playerid, COLOR_YELLOW, "Account locked succesfuly.");

			    }
			  }
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "You must be a level 3 admin to do this command.");
		}
		return 1;
	}
Reply


Messages In This Thread
[HELP]My command doesnt work - by Lilcuete - 06.12.2009, 13:49
Re: [HELP]My command doesnt work - by DJDhan - 06.12.2009, 13:57
Re: [HELP]My command doesnt work - by Lilcuete - 06.12.2009, 14:16
Re: [HELP]My command doesnt work - by DJDhan - 06.12.2009, 14:18
Re: [HELP]My command doesnt work - by Lilcuete - 06.12.2009, 14:22
Re: [HELP]My command doesnt work - by Lilcuete - 06.12.2009, 15:26
Re: [HELP]My command doesnt work - by godknightx - 06.12.2009, 15:30

Forum Jump:


Users browsing this thread: 1 Guest(s)