[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
#2

Umm what does this command do actually?
Reply
#3

it is supposed to unlock the guys account and for /alock it is supposed to lock the account
Reply
#4

what do you mean by lock and unlock account?
Is it to ban and unban or to freeze a player ingame and unfreeze?
Reply
#5

It supposed to unlock the account if the account is locked
it means that if u hack ur account gets lockedand u cant getin but once u do /aunlock and the players name the account will get unlocked
Reply
#6

?
Reply
#7

In the /alock find:
pawn Код:
TogglePlayerControllable(giveplayerid, 1);
And change to:
pawn Код:
TogglePlayerControllable(giveplayerid, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)