[AJUDA] Comando - 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] Comando (
/showthread.php?tid=346905)
[AJUDA] Comando -
goku114 - 30.05.2012
pawn Код:
if(!strcmp(cmd,"/criarevento",true))
{
if((playerid))return SendClientMessage(playerid,0xFF0000FF,"[ERRO]: Apenas Administradores [RCON] Podem Usar Esse Comando");
if(EventoInfo[Criado] == 1)return SendClientMessage(playerid,0xFF0000FF,"[ERRO]: Jб existe um evento criado");
GetPlayerPos(playerid,POS[0],POS[1],POS[2]); GetPlayerFacingAngle(playerid,POS[3]);
EventoInfo[P1] = Float:POS[0];
EventoInfo[P2] = Float:POS[1];
EventoInfo[P3] = Float:POS[2];
EventoInfo[P4] = Float:POS[3];
EventoInfo[Interior] = GetPlayerInterior(playerid);
EventoInfo[Mundo] = GetPlayerVirtualWorld(playerid);
for(new i,k=13; i != k; ++i)
{
GetPlayerWeaponData(playerid,i,EventoInfo[Arma][i],EventoInfo[Balas][i]);
}
if(IsPlayerInAnyVehicle(playerid))
{
EventoInfo[Carro] = GetVehicleModel(GetPlayerVehicleID(playerid));
}
EventoInfo[Criado] = 1;
SendClientMessage(playerid,0x00FF00FF,"[INFO]: Evento criado para abrir digite ( /abrirvaga )");
queria saber como eu boto esse comando somente para admin lvl 2+
Re: [AJUDA] Comando -
ViniBorn - 30.05.2012
pawn Код:
if(Admin[playerid] < 2) // Troque Admin[playerid] pela sua variбvel de admin
return SendClientMessage(playerid,-1,"Vocк nгo й admin 2+");
Re: [AJUDA] Comando - rjjj - 30.05.2012
Coloque no inнcio do conteъdo do comando

:
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, 0xFFFFFFAA, "Comando restrito a administradores de nнvel 2 ou superior !");
Se vocк quiser restringн-lo a administradores RCON, troque isto

:
pawn Код:
if((playerid))return SendClientMessage(playerid,0xFF0000FF,"[ERRO]: Apenas Administradores [RCON] Podem Usar Esse Comando");
Por:
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000FF,"[ERRO]: Apenas Administradores [RCON] Podem Usar Esse Comando");
Caso contrбrio apague a linha do mesmo que estб relacionada a isso.
Espero ter ajudado

.