[Ajuda] Tapete de prego nao faiz danos no pneu ajuda ai
#1

QUANDO COLOCO O TAPETE ELE NAO FAIZ DANOS NO CARRO O Q FASSO PRA ARRUMA ISSO AJUDA AI

PHP код:
    if (strcmp(cmd,"/prego",true) == 0)
    {
        if(!
IsACop(playerid)) return SendClientMessage(playeridCOLOR_GREY"Vocк nгo й um oficial !");
        if(
PlayerInfo[playerid][pCorrente] == 1)
        {
            
SendClientMessage(playeridCOLOR_WHITE"[BLP] Vocк ja criou um tapete de prego, use /rprego para retira-la.");
        }
        else
        {
            if(!
IsPlayerInAnyVehicle(playerid))//animcon
            
{
                
SendClientMessage(playeridCOLOR_WHITE"[BLP] tapete de rego colocada, use /rprego para retira-lo.");
                new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
                
GetPlayerPos(playeridplocxplocyplocz);
                
GetPlayerFacingAngle(playerid,ploca);
                
CreateStrip(plocx,plocy,plocz,ploca);
                
PlayerInfo[playerid][pCorrente] = 1;
            }
            else
             {
                
SendClientMessage(playeridCOLOR_GRAD1"[BLP] Use esse comando somente fora do carro");
             }
        }
        return 
1;
    }
    else if(
strcmp(cmdtext"/removerpregos"true)==|| strcmp(cmdtext"/rprego"true)==0)
    {
        if(!
IsACop(playerid))
        {
            
SendClientMessage(playeridCOLOR_GREY"[BLP] Vocк nгo й um Policial Rodoviario");
            return 
1;
        }
        else
        {
            
//DeleteClosestStrip();
            
PlayerInfo[playerid][pCorrente] = 0;
            
DeleteAllStrip();
        }
        return 
1;
    }
    else if(
strcmp(cmdtext"/removetodospregos"true)==|| strcmp(cmdtext"/rtodospregos"true)==0)
    {
        if(!
IsACop(playerid))
        {
            
SendClientMessage(playeridCOLOR_GREY"[BLP] Vocк nгo й um Policial Rodoviario");
            return 
1;
        }
        else
        {
            
DeleteAllStrip();
        }
        return 
1;
    } 
Reply
#2

vocк esqueзeu de colocar a funзгo para furar os pneus

pawn Код:
public OnPlayerUpdate(playerid)// 17/17 Segundos ele Irб Chegar
{
if(IsPlayerInAnyVehicle(playerid))//Se o Player Esta Veiculo
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))//Se Estiver na Barreira
{
new pneus[4];//4 Pneus
GetVehiclepneusStatus(GetPlayerVehicleID(playerid), pneus[0], pneus[1], pneus[2], pneus[3]);//Geta o Status
UpdateVehiclepneusStatus(GetPlayerVehicleID(playerid), pneus[0], pneus[1], pneus[2], TirePneus(0, 0, 1, 0))//Tira Status
}
}
return 1;
}
Crйditos : pawnsamp
Reply
#3

pawn Код:
#include <a_samp>
#include <SpikeStrip>

strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);

    if (strcmp(cmd,"/ctapete",true) == 0)
    {
        new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateStrip(plocx,plocy,plocz,ploca);
        return 1;
    }
    else if (strcmp(cmd,"/rtapete",true) == 0)
    {
        DeleteClosestStrip(playerid);
        return 1;
    }
    else if (strcmp(cmd,"/removerall",true) == 0)
    {
        DeleteAllStrip();
        return 1;
    }
   
    return 0;
}

Sistema pronto sу copilar


___________________________________
Ajudei? Da Clica aqui ai

+Reputation!!

Custa nada meu amigo

Nгo ajudei?

Custa nada agradecer!

MUITO OBRIGADO!
Reply
#4

opa vlw do said nao deu serto o seu vo testar aq vlw ae
Reply
#5

Reputaзгo ai se ajudei
Reply
#6

era a include q tava bugada ja arrumei vlw ae mais rp
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)