Ayuda Con esta funcion...
#1

Buenas a Todos, Cree un stock para detectar e retornar el id del vehiculo mas cercano al player correspondiente, pero no se ke esta mal ke me devuelve siempre en 0 :S .

pawn Код:
stock JugadorCerca(playerid, Float:distancia) {
    new count=0, idveh=0, Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    for(new v = 1; v < MAX_VEHICLES; v++) {
    if(IsVehicleStreamedIn(v, playerid) && IsVehicleInRangeOfPoint(v, distancia, pos[0], pos[1], pos[2]))
    { count++; break; }
    switch(count) {
        case 1: idveh = v; }
    }
    return idveh;
}
---------------------------------------------------

y con esto tambien tengo problemas, se me repite el texto ke iria en los %s.
pawn Код:
new TextoString[MAX_PLAYERS][30][3];

new str[128];
format(str, sizeof(str), "\
Texto String 1: %s \n\
Texto String 2: %s \n\
Texto String 3: %s \
"
, TextoString[playerid][0], TextoString[playerid][1], TextoString[playerid][2]);

TextoString[playerid][0] = "\0";
format(TextoString[playerid][0],7,"123456",TextoString[playerid][0]);

TextoString[playerid][1] = "\0";
format(TextoString[playerid][1],4,"123",TextoString[playerid][1]);

TextoString[playerid][2] = "\0";
format(TextoString[playerid][2],5,"1234",TextoString[playerid][2]);
Si me puden ayudar se los agradezco.
Desde yam uchas Gracias ;9.
Reply


Messages In This Thread
Ayuda Con esta funcion... - by OTACON - 02.03.2013, 03:14
Respuesta: Ayuda Con esta funcion... - by [J]ulian - 02.03.2013, 03:42
Respuesta: Ayuda Con esta funcion... - by OTACON - 02.03.2013, 03:53
Respuesta: Ayuda Con esta funcion... - by [J]ulian - 02.03.2013, 07:42

Forum Jump:


Users browsing this thread: 1 Guest(s)