[Ajuda] Ajuda com RCON e ADM!
#3

Quote:
Originally Posted by ExPLORE
Посмотреть сообщение
procurado por IsPlayerAdmin em seu comando e troca pela variavel de ADMIN como EX:
pawn Код:
if (IsPlayerAdmin(playerid)) == if (PlayerInfo[playerid][Admin] >= 1)
Tem como fazer pra mim? *-*

Sгo 2 cmds:

Quote:

public OnPlayerCommandText ( playerid , cmdtext [ ] )
{
new cmd [ 256 ] , idx , tmp [ 256 ] , giveplayerid;

cmd = strtok ( cmdtext , idx );

tmp = strtok ( cmdtext , idx );

if ( strcmp ( cmd , "/proteger" , true,6 )
{
if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][Admin] < 5)
}
SendClientMessage ( playerid , 0xFF0000FF , "Use: '/proteger [playerid]'." )
return 1;
}

giveplayerid = strval ( tmp );

if ( ! IsPlayerConnected ( playerid ) )
{
SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]ID Invбlido." );
return 1;
}

Attackable [ giveplayerid ] = 0;

format ( string , sizeof ( string ) , "* %s Estб protegido e nгo poderб ser atacado pelos Mнsseis." , GetName ( giveplayerid ) );
SendClientMessage ( playerid , 0x00FF00FF , string );

SendClientMessage ( giveplayerid , 0x00FF00FF , "* Vocк nгo pode ser atacado pelos Mнsseis." );

return 1;
}

if ( strcmp ( cmd , "/desproteger" , true ) == 0 && IsPlayerAdmin ( playerid ) )
{
if ( ! strlen ( tmp ) )
{
SendClientMessage ( playerid , 0xFF0000FF , "Use: '/desproteger [playerid]'." );
return 1;
}

giveplayerid = strval ( tmp );

if ( ! IsPlayerConnected ( playerid ) )
{
SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]ID Invбlido." );
return 1;
}

Attackable [ giveplayerid ] = 1;

format ( string , sizeof ( string ) , "* %s Estб desprotegido dos Mнsseis." , GetName ( giveplayerid ) );
SendClientMessage ( playerid , 0xFF0000FF , string );

SendClientMessage ( giveplayerid , 0xFF0000FF , "* Vocк estб desprotegido dos Mнsseis." );

return 1;
}

return 0;
}

Quote:

if(strcmp(cmd, "/evento", true)==(PlayerInfo[playerid][Admin] >= 1))

Reply


Messages In This Thread
Ajuda com RCON e ADM! - by PaulinhoHuback - 05.10.2014, 02:18
Re: Ajuda com RCON e ADM! - by ExPLORE - 05.10.2014, 02:22
Re: Ajuda com RCON e ADM! - by PaulinhoHuback - 05.10.2014, 02:29
Re: Ajuda com RCON e ADM! - by ExPLORE - 05.10.2014, 02:42

Forum Jump:


Users browsing this thread: 1 Guest(s)