[Pedido] Comando /SetCar
#2

pawn Код:
CMD:criarveiculo(playerid, params[])
{
    new v[3], Float:pos[4], file[15] = "carros.txt", string[15], string2[15], ip[70];
    if(sscanf(params, "iii", v[0], v[1], v[2]))
        return SendClientMessage(playerid, 0xC0C0C0AA, " Sintaxe: /criarveiculo [model] [color[1]] [color[2]]");
    GetPlayerIp(playerid, ip, sizeof ip);
    if(!DOF2_FileExists(file)) DOF2_CreateFile(file);
    format(string, sizeof string, "%s", ip);
    format(string, sizeof string, "Modelo: %d Cor 1: %d Cor 2: %d", v[0], v[1], v[2]);
    DOF2_SetString(file, string, string2);
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]) && GetPlayerFacingAngle(playerid, pos[3]);
    CreateVehicle(v[0], pos[0], pos[1], pos[2], pos[3], v[1], v[2], -1);
    return true;
}
isso deve funcionar ^^
Reply


Messages In This Thread
Comando /SetCar - by ArthurxD - 01.09.2014, 18:17
Re: Comando /SetCar - by Rodrigues2015 - 01.09.2014, 19:32
Re: Comando /SetCar - by ArthurxD - 02.09.2014, 02:32

Forum Jump:


Users browsing this thread: 1 Guest(s)