22.12.2010, 15:49
queria saber como coloco pra pessoa usar um comando so se estiver logada na rcon
IsPlayerAdmin
//---------------------------------------[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;
}
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;
}
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;
}