[Ajuda] Bloquear Comando Para Procurados - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Bloquear Comando Para Procurados (
/showthread.php?tid=642133)
Bloquear Comando Para Procurados -
Kleberson - 25.09.2017
Queria que os Jogadores procurados nгo conseguissem usar esse comando, aparecer uma mensagem tipo: "vocк estб procurado e nгo pode usar esse comando"
pawn Код:
if( !strcmp( cmdtext, "/consertar", true ))
{
if( pInfo[ playerid ][ PLAYER_VIP ] == 1 || dini_Int( f( playerid ), "*******r" ) == 1 || pInfo[ playerid ][ Prof ] == MECANICO || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Ajudante ] == 1 || aInfo[ playerid ][ Moderador ] == 1 )
{
if( !IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
return 1;
}
SendClientMessage( playerid, COLOR_AMARELO, "[ > ] Veнculo consertado !" );
new
v = GetPlayerVehicleID( playerid )
;
resetNeon( playerid );
SetVehicleHealth( v, 1000 );
RepairVehicle( v );
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
}
return 1;
}
Re: Bloquear Comando Para Procurados -
JonathanFeitosa - 25.09.2017
PHP код:
if(GetPlayerWantedLevel(playerid) >= 1) return SendClientMessage(playerid, -1, "Vocк estб sendo procurado");
Re: Bloquear Comando Para Procurados -
zCyan - 25.09.2017
PHP код:
if( !strcmp( cmdtext, "/consertar", true ))
{
if( pInfo[ playerid ][ PLAYER_VIP ] == 1 || dini_Int( f( playerid ), "*******r" ) == 1 || pInfo[ playerid ][ Prof ] == MECANICO || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Ajudante ] == 1 || aInfo[ playerid ][ Moderador ] == 1 )
{
if( !IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
return 1;
}
if(GetPlayerWantedLevel(playerid) >= 1)
{
SendClientMessage(playerid,-1,"ERRO: Vocк estб procurado e nгo pode usar esse comando.");
return 1;
}
SendClientMessage( playerid, COLOR_AMARELO, "[ > ] Veнculo consertado !" );
new v = GetPlayerVehicleID( playerid );
resetNeon( playerid );
SetVehicleHealth( v, 1000 );
RepairVehicle( v );
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
}
return 1;
}
Re: Bloquear Comando Para Procurados -
Kleberson - 25.09.2017
Quote:
Originally Posted by zCyan
PHP код:
if( !strcmp( cmdtext, "/consertar", true ))
{
if( pInfo[ playerid ][ PLAYER_VIP ] == 1 || dini_Int( f( playerid ), "*******r" ) == 1 || pInfo[ playerid ][ Prof ] == MECANICO || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Ajudante ] == 1 || aInfo[ playerid ][ Moderador ] == 1 )
{
if( !IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
return 1;
}
if(GetPlayerWantedLevel(playerid) >= 1)
{
SendClientMessage(playerid,-1,"ERRO: Vocк estб procurado e nгo pode usar esse comando.");
return 1;
}
SendClientMessage( playerid, COLOR_AMARELO, "[ > ] Veнculo consertado !" );
new v = GetPlayerVehicleID( playerid );
resetNeon( playerid );
SetVehicleHealth( v, 1000 );
RepairVehicle( v );
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
}
return 1;
}
|
funcionou Mano, vlw <3
Re: Bloquear Comando Para Procurados -
fxckshzt - 25.09.2017
Quote:
Originally Posted by zCyan
PHP код:
if( !strcmp( cmdtext, "/consertar", true ))
{
if( pInfo[ playerid ][ PLAYER_VIP ] == 1 || dini_Int( f( playerid ), "*******r" ) == 1 || pInfo[ playerid ][ Prof ] == MECANICO || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Ajudante ] == 1 || aInfo[ playerid ][ Moderador ] == 1 )
{
if( !IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
return 1;
}
if(GetPlayerWantedLevel(playerid) >= 1)
{
SendClientMessage(playerid,-1,"ERRO: Vocк estб procurado e nгo pode usar esse comando.");
return 1;
}
SendClientMessage( playerid, COLOR_AMARELO, "[ > ] Veнculo consertado !" );
new v = GetPlayerVehicleID( playerid );
resetNeon( playerid );
SetVehicleHealth( v, 1000 );
RepairVehicle( v );
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
}
return 1;
}
|
Dava pra vocк resumir o comando em poucas linhas utilizando o return...
Alguns brackets sгo desnecessбrios...