[Ajuda] Ajuda com Comando
#1

Depois que destru-o os carros e quero botar os os carros da gm, nao cumpri a funзao oq posso fazer

Respawn dos carros
PHP код:
CMD:rc(playerid)
{
    if(
Logado[playerid] == false) return SendClientMessage(playeridCinza"[ERRO] Vocк deve logar primeiro.");
    if(
CBDAdmin[playerid] < && !IsPlayerAdmin(playerid)) return SendClientMessage(playeridCinza"[CBD-INFO] Somente Administrador Level 1 ou superior.");
    new 
bool:vehicle[MAX_VEHICLES], rStr[140];
    
format(rStrsizeof rStr"[Administrador] O %s resetou todos os veнculos."rNome(playerid));
    
SendClientMessageToAll(VerderStr);
    for(new 
1GetVehicleModel(j); ++j)
    {
        
vehicle[j] = false;
        for(new 
iGetMaxPlayers(); p; ++i)
        {
            if(!
IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i)) continue;
            if(
IsPlayerInVehicle(ij))
            {
                
vehicle[j] = true;
                break;
            }
        }
        if(!
vehicle[j]) SetVehicleToRespawn(j);
    }
    return 
1;

Destruir Carros
PHP код:
CMD:destruircarros(playerid)
{
    if(
Logado[playerid] == false) return SendClientMessage(playeridCinza"[ERRO] Vocк deve logar primeiro.");
    if(
CBDAdmin[playerid] < && !IsPlayerAdmin(playerid)) return SendClientMessage(playeridCinza"[CBD-INFO] Somente Administrador Level 1 ou superior.");
    new 
bool:vehicle[MAX_VEHICLES], rStr[140];
    
format(rStrsizeof rStr"[Administrador] O %s Destruiu todos os veнculos."rNome(playerid));
    
SendClientMessageToAll(VerderStr);
    for(new 
1GetVehicleModel(j); ++j)
    {
        
vehicle[j] = false;
        for(new 
iGetMaxPlayers(); p; ++i)
        {
            if(!
IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i)) continue;
            if(
IsPlayerInVehicle(ij))
            {
                
vehicle[j] = true;
                break;
            }
        }
        if(!
vehicle[j]) DestroyVehicle(j);
    }
    return 
1;

Reply
#2

PHP код:
CMD:dcm(playeridparams[])
{
    
#pragma unused params
    
if(Player[playerid][pAdmin] >= || Player[playerid][pDJ] >= || Player[playerid][pVip] >= || Player[playerid][pGerente] >= || Player[playerid][pFrente] >= || Player[playerid][pBOPE] >= || Player[playerid][pPMRJ] >= || Player[playerid][pCORE] >= 5)
    {
        if(
Player[playerid][VehicleCreatedFree] >= 1)
        {
            
RemoveNeon(playerid);
            
DestroyVehicle(Player[playerid][VehicleCreatedFree]);
            
Player[playerid][VehicleCreatedFree] = 0;
            
SendClientMessage(playeridCOR_PRINCIPAL"{9090ee}## Veiculo deleta com sucesso.");
        }
        else 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo tem um veнculo criado !");
    }
    else 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo tem permissгo para usar este comando!");
    return 
1;
}
CMD:rc(playeridparams[])
{
    
#pragma unused params
    
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
    {
        if(
Player[playerid][pAdmin] >= || Player[playerid][pDJ] >= || Player[playerid][pVip] >= || Player[playerid][pGerente] >= || Player[playerid][pFrente] >= || Player[playerid][pCORE] >= || Player[playerid][pPMRJ] >= || Player[playerid][pBOPE] >= || Player[playerid][pReporterLS] >= 2)
        {
            new 
vehicleid;
            
vehicleid GetPlayerVehicleID(playerid);
            
RemoveNeon(playerid);
            
SetVehicleToRespawn(vehicleid);
            new 
string[128];
            
format(string128"{9090ee}## %s respawnou um veiculo."getPName(playerid));
            
MensagemLocal(playeridCOR_ROXOstring50);
        }
        else 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo tem permissгo para usar este comando!");
    }
    else 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo estб em um veнculo ou nгo estб dirigindo ele.");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)