[HELP]My command doesnt work - 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: [HELP]My command doesnt work (
/showthread.php?tid=112235)
[HELP]My command doesnt work -
Lilcuete - 06.12.2009
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;
}
Re: [HELP]My command doesnt work -
DJDhan - 06.12.2009
Umm

what does this command do actually?
Re: [HELP]My command doesnt work -
Lilcuete - 06.12.2009
it is supposed to unlock the guys account and for /alock it is supposed to lock the account
Re: [HELP]My command doesnt work -
DJDhan - 06.12.2009
what do you mean by lock and unlock account?
Is it to ban and unban or to freeze a player ingame and unfreeze?
Re: [HELP]My command doesnt work -
Lilcuete - 06.12.2009
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
Re: [HELP]My command doesnt work -
Lilcuete - 06.12.2009
?
Re: [HELP]My command doesnt work -
godknightx - 06.12.2009
In the /alock find:
pawn Код:
TogglePlayerControllable(giveplayerid, 1);
And change to:
pawn Код:
TogglePlayerControllable(giveplayerid, 0);