como coloco um comando para pessoa so usar se estiver logada na rcon
#1

queria saber como coloco pra pessoa usar um comando so se estiver logada na rcon
Reply
#2

@EDIT
agora que entendi ae,usa:
pawn Код:
IsPlayerAdmin
So falo isso e nao ti ajudo completamente pq tenho que sair aki agora...
Reply
#3

como assim tipo

olha o meu comando

//---------------------------------------[Portao]--------------------------------------------------------
if (strcmp("/fechar", cmdtext, true, 10) == 0)
{
MoveObject(portao, -302.399,1507.475,77.133,2.1 );
return 1;
}
if (strcmp("/abrir", cmdtext, true, 10) == 0)
{
MoveObject(portao, -302.591,1507.351,71.131,2.1 );
return 1;
}
Reply
#4

pawn Код:
//---------------------------------------[Portao]--------------------------------------------------------
if (strcmp("/fechar", cmdtext, true, 10) == 0)
{
 if (IsPlayerAdmin(playerid))
{
MoveObject(portao, -302.399,1507.475,77.133,2.1 );
return 1;
}
if (strcmp("/abrir", cmdtext, true, 10) == 0)
{
MoveObject(portao, -302.591,1507.351,71.131,2.1 );
return 1;
}
Reply
#5

pawn Код:
if (strcmp("/fechar", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid)) SendClientMessage(0xDEEE20FF, "Vocк o fechou o portгo.");

   else SendClientMessage(0xDEEE20FF, "Vocк nгo й ADM."); }
{
MoveObject(portao, -302.399,1507.475,77.133,2.1 );
return 1;
}
if (strcmp("/abrir", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid) SendClientMessage(0xDEEE20FF, "Vocк abriu o portгo.");
else SendClientMessage(0xDEEE20FF, "Vocк nгo й ADM.");
}
{
MoveObject(portao, -302.591,1507.351,71.131,2.1 );
return 1;
}
Reply
#6

ta dado 5 errors
Reply
#7

Entгo poste-os
Reply
#8

o meu tambйm? se tiver posta os erros
Reply
#9

Eu uso assim!
Nao testei!

pawn Код:
if (strcmp("/fechar", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"Vocк nгo й um admin.")
MoveObject(portao, -302.399,1507.475,77.133,2.1 );
return 1;
}
if (strcmp("/abrir", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"Vocк nгo й um admin.")
MoveObject(portao, -302.591,1507.351,71.131,2.1 );
return 1;
}
Reply
#10

C:\Documents and Settings\Livre\Desktop\Marvin'\[LSD]Drift\pawno\LSD.pwn(1476) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Livre\Desktop\Marvin'\[LSD]Drift\pawno\LSD.pwn(147 : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Livre\Desktop\Marvin'\[LSD]Drift\pawno\LSD.pwn(1483) : warning 225: unreachable code
C:\Documents and Settings\Livre\Desktop\Marvin'\[LSD]Drift\pawno\LSD.pwn(1485) : error 001: expected token: ")", but found "-identifier-"
C:\Documents and Settings\Livre\Desktop\Marvin'\[LSD]Drift\pawno\LSD.pwn(1485) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Livre\Desktop\Marvin'\[LSD]Drift\pawno\LSD.pwn(1486) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Livre\Desktop\Marvin'\[LSD]Drift\pawno\LSD.pwn(1493) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)