їLo estoy haciendo bien?
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Vas bien, pero hay algunos notas. No es necesario hacer un loop para asignar una variable como el ID de un vehнculo y cuando vayas a retornar un valor en un loop, parra el loop primero con "break;", y luego retorna el valor.

pawn Код:
new vhTruckCount;

public OnGameModeInit()
{
    CreateTruck(414, 1052.8551, 1917.7247, 10.8981, 0.0000, -1, -1, 100);
    CreateTruck(414, 1060.3757, 1917.9557, 10.8981, 0.0000, -1, -1, 100);
    CreateTruck(414, 1067.8254, 1917.8627, 10.8981, 0.0000, -1, -1, 100);
    CreateTruck(414, 1076.5006, 1917.8225, 10.8981, 0.0000, -1, -1, 100);
    CreateTruck(414, 1082.6708, 1917.7721, 10.8981, 0.0000, -1, -1, 100);
    CreateTruck(414, 1091.2550, 1917.8107, 10.8981, 0.0000, -1, -1, 100);
    CreateTruck(414, 1106.0496, 1920.0028, 10.8981, 90.0000, -1, -1, 100);
    CreateTruck(414, 1106.0044, 1925.8887, 10.8981, 90.0000, -1, -1, 100);
    CreateTruck(414, 1106.0172, 1934.7740, 10.8981, 90.0000, -1, -1, 100);
    CreateTruck(414, 1106.0516, 1911.2572, 10.8981, 90.0000, -1, -1, 100);
    CreateTruck(414, 1106.1534, 1903.8564, 10.8981, 90.0000, -1, -1, 100);
    CreateTruck(414, 1106.1299, 1896.6113, 10.8981, 90.0000, -1, -1, 100);
    CreateTruck(414, 1091.7219, 1889.2329, 10.8981, 180.0000, -1, -1, 100);
    CreateTruck(414, 1082.8315, 1889.2240, 10.8981, 180.0000, -1, -1, 100);
    CreateTruck(414, 1076.6324, 1889.3217, 10.8981, 180.0000, -1, -1, 100);
    return 1;
}

stock CreateTruck(model, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay, addsiren = 0)
{
    InformacionCam[vhTruckCount][CAM_ID] = CreateVehicle(model, x, y, z, angle, color1, color2, respawn_delay, addsiren);
    vhTruckCount ++;
}

stock GetTruckID(vehicleid)
{
    new truckid = -1;
    for(new i = 0; i < MAX_CAMIONES; i ++)
    {
        if(InformacionCam[i][CAM_ID] == vehicleid)
        {
            truckid = i;
            break;
        }
    }
    return truckid;
}
Y ese nombre en Spanglish, que onda?
Perfect! :3 Gracias.
Tengo la costumbre de hacer las funciones Spanglish xDDD


---------------

їMe pueden ayudar con esto por favor? :C
Nuevamente, muchas gracias.
PHP код:
if(GetTruckID(veh) == -1) return MensajeError(playerid, -1"No estas en un vehнculo del trabajo."); 
Quote:

C:\Users\Equipo\PosibleRP\gamemodes\Gamemode.pwn(9 19) : error 001: expected token: "-string end-", but found "-identifier-"

Reply


Messages In This Thread
їLo estoy haciendo bien? - by Ghost112397 - 22.05.2015, 02:19
Respuesta: їLo estoy haciendo bien? - by OTACON - 22.05.2015, 02:50
Re: їLo estoy haciendo bien? - by SickAttack - 22.05.2015, 02:56
Respuesta: Re: їLo estoy haciendo bien? - by Ghost112397 - 22.05.2015, 22:28
Re: їLo estoy haciendo bien? - by SickAttack - 22.05.2015, 22:42
Respuesta: Re: їLo estoy haciendo bien? - by Ghost112397 - 22.05.2015, 22:47
Re: Respuesta: Re: їLo estoy haciendo bien? - by SickAttack - 22.05.2015, 22:52

Forum Jump:


Users browsing this thread: 1 Guest(s)