How to Lock&Unlock In 1 Command?
#1

https://sampforum.blast.hk/showthread.php?tid=330973
Reply
#2

in the top
pawn Код:
new locked[MAX_PLAYERS];
the cmd

pawn Код:
CMD:lock(playerid, params[])
{
if(locked[playerid] == 1)
{
FUNTION TO UN LOCK
}
else
{
FUNTION TO LOCK
}
return 1;
}
Reply
#3

Код:
C:\Game\GTA - San Andreas\Windows Server\pawno\test.pwn(148) : warning 203: symbol is never used: "CMD"
C:\Game\GTA - San Andreas\Windows Server\pawno\test.pwn(148) : error 055: start of function body without function header
C:\Game\GTA - San Andreas\Windows Server\pawno\test.pwn(148 -- 162) : error 010: invalid function or declaration
C:\Game\GTA - San Andreas\Windows Server\pawno\test.pwn(148 -- 166) : error 010: invalid function or declaration
C:\Game\GTA - San Andreas\Windows Server\pawno\test.pwn(148 -- 166) : fatal error 107: too many error messages on one line
I got an error, I actually don't know how to this. >.<
Reply
#4

pawn Код:
CMD:lock(playerid, params[])
{
if(locked[playerid] == 1)
{
FUNTION TO UN LOCK
}
else
{
FUNTION TO LOCK
locked[playerid]=0; // and put the value to 0 here
}
return 1;
}
it is done with zcmd, it's a command processor, search for it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)