[Ajuda] Converter comando.
#1

Alguem poderia converter esse comando pra mim pra ZCMD?

PHP код:
    new cmd[256];
    new 
tmp[256];
    new 
idx;
    
cmd strtok(cmdtextidx);
     new 
giveplayer[MAX_PLAYER_NAME];
     new 
string[256];
    if(
strcmp(cmd"/ejetarplayer"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
           {
            new 
State;
            if(
IsPlayerInAnyVehicle(playerid))
            {
                 
State=GetPlayerState(playerid);
                if(
State!=PLAYER_STATE_DRIVER)
                {
                    
SendClientMessage(playerid,-1,"   Vocк nгo й o motorista do carro !");
                    return 
true;
                }
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playerid, -1"USE: /ejetar [id]");
                    return 
true;
                }
                new 
playa;
                new 
test;
                
test GetPlayerVehicleID(playerid);
                if(
IsPlayerConnected(playa))
                {
                    if(
playa != INVALID_PLAYER_ID)
                    {
                        if(
playa == playerid) { SendClientMessage(playerid, -1"Vocк nгo pode se expulsar... Aperte Enter ¬¬!"); return true; }
                        if(
IsPlayerInVehicle(playa,test))
                        {
                            new 
PName[MAX_PLAYER_NAME];
                            
GetPlayerName(playerid,PName,sizeof(PName));
                            
GetPlayerName(playagiveplayersizeof(giveplayer));
                            
format(stringsizeof(string), "* Vocк expulsou o(a) %s para fora do carro!"giveplayer);
                            
SendClientMessage(playerid, -1string);
                            
format(stringsizeof(string), "* Vocк foi retirado do carro por %s !"PName);
                            
SendClientMessage(playa, -1string);
                            
RemovePlayerFromVehicle(playa);
                        }
                        else
                        {
                            
SendClientMessage(playerid, -1"   Este jogador nгo estб em seu carro !");
                            return 
true;
                        }
                    }
                }
                else
                {
                    
SendClientMessage(playerid, -1" ID/Nick - Invalido!");
                }
            }
            else
            {
                
SendClientMessage(playerid, -1"   Vocк precisa estar em um carro para usar este comando !");
            }
        }
        return 
true;
    } 
Reply


Messages In This Thread
Converter comando. - by Username1234 - 17.05.2015, 22:01
Re: Converter comando. - by LockedLucas - 17.05.2015, 22:05
Re: Converter comando. - by GabrielDias_Invision - 17.05.2015, 23:15

Forum Jump:


Users browsing this thread: 1 Guest(s)