[Ajuda] CMD de criar carro
#4

Tenta esse abaixo.

pawn Код:
CMD:cv(playerid, params[])
{
    if(/* variavel de adm  */)
    {
        new string[256], modelo, carro, cor1, cor2,
            Float:X, Float:Y, Float:Z, Float:Angle;

        if(sscanf(params, "ddd", modelo, cor1, cor2)) return SendClientMessage(playerid, -1, "Digite: /cv [modelo] [cor1] [cor2]");

        if(IsPlayerConnected(playerid))
        {
            if(modelo >= 400 && modelo <= 611)
            {
                if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Saia deste veнculo para criar outro.");
                   
                GetPlayerPos(playerid, X, Y, Z);
                GetPlayerFacingAngle(playerid, Angle);

                carro = AddStaticVehicleEx(modelo, X, Y, Z, Angle, cor1, cor2, 30);

                LinkVehicleToInterior(carro, GetPlayerInterior(playerid));
                SetVehicleVirtualWorld(carro, GetPlayerVirtualWorld(playerid));

                format(string, sizeof(string), "Vocк criou o veнculo de id: %d", modelo);
                SendClientMessage(playerid, -1, string);
            }
            else SendClientMessage(playerid, -1, "ID invбlido, tente novamente! (ID's: 400-611");
        }
    }
    return 1;
}
ddd
Reply


Messages In This Thread
CMD de criar carro - by BWCALLEf - 16.06.2014, 01:26
Re: CMD de criar carro - by KILERTRANSUDO - 16.06.2014, 01:30
Re: CMD de criar carro - by MultiKill - 16.06.2014, 03:17
Re: CMD de criar carro - by Ts3 - 16.06.2014, 20:12

Forum Jump:


Users browsing this thread: 2 Guest(s)