[Pedido] Name Й id no veiculo
#2

Use esse cуdigo, nгo testei in-game mas foi compilado, nгo se esqueзa de usar as includes.

PHP код:

//Includes
#include <sscanf2>
#include <ZCMD>
CMD:veiculo (playeridparams[])
{
    new 
String[128], Nome[24], ModelVeiculoCor1Cor2,
    
Float:XFloat:YFloat:ZFloat:Angle;
    if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1"Primeiro saia do veiculo atual.");
    if(
sscanf(params"ddd"ModelCor1Cor2)) return SendClientMessage(playerid, -1"Use: /veiculo (ID) (Cor1) (Cor2)");
    if(
IsPlayerConnected(playerid))
    {
        if(
Model >= 400 && Model <= 611)
        {
            
GetPlayerPos(playeridXYZ);
            
GetPlayerFacingAngle(playeridAngle);
            
Veiculo AddStaticVehicleEx(ModelXYZAngleCor1Cor230);
            
LinkVehicleToInterior(VeiculoGetPlayerInterior(playerid));
            
SetVehicleVirtualWorld(VeiculoGetPlayerVirtualWorld(playerid));
            
GetPlayerName(playeridNomesizeof(Nome));
            
format(Stringsizeof(String), "Olб %s, vocк criou o veнculo ID: %d"NomeModel);
            
SendClientMessage(playerid, -1String);
        }
        else
            
SendClientMessage(playerid, -1"Veiculo invбlido, use id's de 400 a 611");
    }
    return 
1;

Reply


Messages In This Thread
Name Й id no veiculo - by BrGabrielBr - 01.03.2018, 19:43
Re: Name Й id no veiculo - by IgorLuiz - 01.03.2018, 20:26
Re: Name Й id no veiculo - by BrGabrielBr - 01.03.2018, 21:38
Re: Name Й id no veiculo - by Marllun - 01.03.2018, 21:47

Forum Jump:


Users browsing this thread: 1 Guest(s)