[Tutorial] [TUT]Trancar/Destrancar Veiculos
#1

TRANCAR

pawn Code:
if (strcmp(cmdtext, "/OCOMANDOPARA TRANCAR", true)==0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new State=GetPlayerState(playerid);
        if(State!=PLAYER_STATE_DRIVER)
        {
            SendClientMessage(playerid,0xFF004040,"Vocк pode Trancar sу as portas como o motorista.");
            return 1;
        }
        new i;
        for(i=0;i<MAX_PLAYERS;i++)
        {
            if(i != playerid)
            {
                SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
            }
        }
        SendClientMessage(playerid, 0x33AA33AA, "Veiculo Trancado");
        new Float:pX, Float:pY, Float:pZ;
        GetPlayerPos(playerid,pX,pY,pZ);
        PlayerPlaySound(playerid,1056,pX,pY,pZ);
    }
    else
    {
    SendClientMessage(playerid, 0xFF004040, "Voce Nao Esta Em Um veiculo);
    }
return 1;
DESTRANCAR O VEICULO
pawn Code:
if (strcmp(cmdtext, "/COMANDO PARA DESTRANCAR, true)==0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new State=GetPlayerState(playerid);
        if(State!=PLAYER_STATE_DRIVER)
        {
            SendClientMessage(playerid,0xFF004040,"
Vocк pode destrancar sу as portas como o motorista);
            return 1;
        }
        new i;
        for(i=0;i<MAX_PLAYERS;i++)
        {
            SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
        }
        SendClientMessage(playerid, 0x33AA33AA, Veiculo Trancado!");
        new Float:pX, Float:pY, Float:pZ;
        GetPlayerPos(playerid,pX,pY,pZ);
        PlayerPlaySound(playerid,1057,pX,pY,pZ);
    }
    else
    {
    SendClientMessage(playerid, 0xFF004040, "
You're not in a vehicle!");
    }
return 1;
}
[b]Espero que esse tutorial seja utiu para quem esta atras.
Reply


Messages In This Thread
[TUT]Trancar/Destrancar Veiculos - by chapolin1994 - 20.01.2010, 23:14
Re: [TUT]Trancar/Destrancar Veiculos - by Caio_Cartaxo - 20.01.2010, 23:28
Re: [TUT]Trancar/Destrancar Veiculos - by Guilherme_Canani - 20.01.2010, 23:33
Re: [TUT]Trancar/Destrancar Veiculos - by chapolin1994 - 21.01.2010, 00:02
Re: [TUT]Trancar/Destrancar Veiculos - by [O_o]Davidovich - 21.01.2010, 00:08
Re: [TUT]Trancar/Destrancar Veiculos - by Lucas Giovanni - 21.01.2010, 01:07
Re: [TUT]Trancar/Destrancar Veiculos - by Wiz88 - 14.08.2010, 07:37
Re: [TUT]Trancar/Destrancar Veiculos - by SuB_ZeRo0_ - 14.08.2010, 11:34
Re: [TUT]Trancar/Destrancar Veiculos - by sergio_xd - 14.08.2010, 14:16
Re: [TUT]Trancar/Destrancar Veiculos - by smd_murilo - 19.09.2010, 03:44

Forum Jump:


Users browsing this thread: 3 Guest(s)