26.07.2011, 17:37
Queria Sabe como criar um comando para administradores logados na rcon
public OnRconCommand(cmd[])
{
if(!strcmp(cmd,"comando",true))
{
// Funзхes
}
return true;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/comando",true))
{
if(!IsPlayerAdmin(playerid)) return true;
// Funзхes
}
return true;
}
if(strcmp(cmdtext, "/souadmrcon",true)==0){
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Vocк nгo й Admin");
new forumhts[256];
GetPlayerName(playerid, forumhts, sizeof(forumhts));
format(forumhts,sizeof(forumhts),"%s Й ADM RCON"forumhts);
SendClientMessageToAll(playerid,0xFFFFFFFF,forumhts);
return true;}
if(strcmp(cmd,"/say",true)==0){ new aname[MAX_PLAYER_NAME]; if(IsPlayerAdmin(playerid)){ new tmp[256]; new msg[256]; strmid(tmp,cmdtext,4,strlen(cmdtext)); if(!strlen(tmp)) { SendClientMessage(playerid,Vermelho,"/say [texto]"); return 1; } else { format(msg,sizeof(msg),"Admin %s Diz: %s",aname,tmp); SendClientMessageToAll(tcadm,msg); return 1; } }else{ SendClientMessage(playerid,Vermelho,"[Info-RedBull] Voce Nao Tem Permissao!"); return 1; } } |