SA-MP Forums Archive
Conversor de Comandos zcmd parбgrafo strcmp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Conversor de Comandos zcmd parбgrafo strcmp (/showthread.php?tid=622926)



Conversor de Comandos zcmd parбgrafo strcmp - baela - 28.11.2016

Olб Senhores, Quero ajuda para converter o parбgrado zcmd para strcmp

PHP код:
CMD:evento(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid) || pAdmin[playerid] == 5) return SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo estб autorizado a usar este comando!");
    new 
Mensagem[603];
    
strcat(Mensagem"Criar Evento\nSalvar Minha Posiзгo como Local do Evento\nAbrir / Fechar Evento\nDefinir Premio do 1є Colocado\n");
    
strcat(Mensagem"Definir Premio do 2є Colocado\nDefinir Premio do 3є Colocado\nDar Armas para os Jogadores do Evento\nDar um Carro para os Jogador do Evento ~g~\nDestruir Evento\nSetar Vida dos Veiculos\nKickar Jogador do Evento\n");
    
strcat(Mensagem"Setar Vida dos Jogadores do Evento\nTrocar Skin dos Jogadores do Evento\nBanir Jogador dos EventosOFF\nDesbanir JogadorOFF\nPuxar jogador para o evento\nVisualizar informaзхes de um Jogador Banido\nCongelar Jogadores do Evento\nDescongelar Jogadores do Evento\nResetar Armas dos Jogadores do Evento");
    
ShowPlayerDialog(playeridDIALOG_EVENTODIALOG_STYLE_LIST"{FF0000}Painel de Controle do Sistema de Eventos"Mensagem"Selecionar""Cancelar");
    return 
1;
}
CMD:mevento(playeridparams[])
{
//    ChecarBan(playerid);
    
if(PlayerInfo[playerid][Banido] == 1) return SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo pode entrar em um evento pois foi banido!");
    if(
EventInfo[Criado] == 0)    return    SendClientMessage(playeridCOR_ERRO"[ERRO] Nгo existe nenhum evento criado!");
    if(
EventInfo[Aberto] == 0)    return    SendClientMessage(playeridCOR_ERRO"[ERRO] O Evento estб Trancado no momento!");
    if(
PlayerInfo[playerid][NoEvento] == 1) return SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк jб estб no Evento!");
    
SetPlayerVirtualWorld(playeridEventInfo[VirtualWorld]);
    
SetPlayerInterior(playeridEventInfo[Interior]);
    
SetPlayerHealth(playerid100);
    
SetPlayerArmour(playerid100);
    
ResetPlayerWeapons(playerid);
    
SetPlayerPos(playeridEventInfo[X], EventInfo[Y], EventInfo[Z]);
    
SetPlayerFacingAngle(playeridEventInfo[A]);
    
PlayerInfo[playerid][NoEvento] = 1;
    return 
1;
}
CMD:ce(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid) || pAdmin[playerid] == || organizador[playerid]) return SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo estб autorizado a usar este comando!");
    if(
EventInfo[Criado] == 0)    return    SendClientMessage(playeridCOR_ERRO"[ERRO] Nгo existe nenhum evento criado!");
    if(
PlayerInfo[playerid][NoEvento] == 0) return SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo estб no Evento!");
    new 
Mensagem[128];
    if(
sscanf(params"s[128]"Mensagem)) return SendClientMessage(playeridCOR_ERRO"[ERRO] Use /ce (Chat Evento) [Mensagem]");
    
GetPlayerName(playeridNomePlayerMAX_PLAYER_NAME);
    
format(Formatsizeof(Format), "{FF0000}[EVENTO] %s: {FFFFFF}%s"NomePlayerMensagem);
    
SendEventMessage(COR_INFOFormat);
    return 
1;
}
CMD:sairevento(playeridparams[])
{
    if(
PlayerInfo[playerid][NoEvento] == 0) return SendClientMessage(playeridCOR_ERRO"[ERRO] Nгo й possivel sair de um Evento que vocк nгo estб!");
    
SetPlayerVirtualWorld(playerid0);
    
SetPlayerInterior(playerid0);
    
SpawnPlayer(playerid);
    
PlayerInfo[playerid][NoEvento] = 0;
    if(
PlayerInfo[playerid][Carro] >= 1)
    {
        
DestroyVehicle(PlayerInfo[playerid][Carro]);
        
PlayerInfo[playerid][Carro] = 0;
    }
    
SendClientMessage(playeridCOR_INFO"[INFO] Vocк saiu do Evento!");
    return 
1;