[Ayuda] No sirve el codigo.
#1

Bueno aquн yo de nuevo disculpen las molestias, les explicare; Segъn yo este funciуn que hice permite a los policнas ver la localizaciуn del delincuente a continuaciуn se las dejo:
pawn Код:
forward Marcarjugador(showplayerid);//el foward

//aqui el comando para dar delitos
CMD:delito(playerid, params[])
{
    new
        cmdid,
        estrellas,
        string[128],
        name[24],
        data[128],
        msg[128];
    GetPlayerName(playerid, name, 24);
    if(Informacion[playerid][Faccion] == 1)
        {

    if(sscanf(params, "un", cmdid, estrellas))
        return SendClientMessage(playerid,ROJO,"Uso: /delito [id] [estrellas]");
    if(cmdid == playerid)
        return SendClientMessage(playerid,ROJO,"No te puedes poner cargos tu mismo.");
    if(!IsPlayerConnected(cmdid) || cmdid == INVALID_PLAYER_ID)
        return SendClientMessage(playerid,ROJO,"ID Invalido.");

    new oname[MAX_PLAYER_NAME];
    GetPlayerName(cmdid, oname, sizeof(oname));

    {
        format(string, sizeof(string), "Te an puesto {DE0000}%d{FFFFFF} cargo(s), usa {FFF000}/rendirse{FFFFFF} o huye de la policia.",estrellas);
        format(msg, sizeof(msg), "Le has puesto {DE0000}%d{FFFFFF} cargo(s) a {DE0000}(%s [%i])", estrellas,oname,cmdid);
        SetPlayerWantedLevel(cmdid, estrellas);
        Informacion[cmdid][Carcel] = 1;
        Buscado[cmdid] = 1;
        Marcarjugador(cmdid);  //<----La funcion
    }
    SendClientMessage(cmdid,-1, string);
    SendClientMessage(playerid,-1, msg);
    format(data,sizeof(data),"[Police Chat] %s [%i]: Le he puesto %d cargo(s) a %s.",name,playerid,estrellas,oname);
    MensajePolicia(0x00A3FFFF,data);
        print(string);
    }
    return 1;
}

//y por ultimo el public

public Marcarjugador(showplayerid)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(Informacion[i][Faccion] == 1) //<--- Policнa
        {
            if(Logueado[i] == 1)
    {
        SetPlayerMarkerForPlayer( i, showplayerid, AMARILLO );

        }
    }
    }
}
Lo ъnico que hace es que el player se ponga amarillo y nada mas no enseсa la localizaciуn, espero y me puedan ayudar y gracias de antemano.
Reply
#2

Quote:
Originally Posted by armandozetaxx
Посмотреть сообщение
Bueno aquн yo de nuevo disculpen las molestias, les explicare; Segъn yo este funciуn que hice permite a los policнas ver la localizaciуn del delincuente a continuaciуn se las dejo:
pawn Код:
forward Marcarjugador(showplayerid);//el foward

//aqui el comando para dar delitos
CMD:delito(playerid, params[])
{
    new
        cmdid,
        estrellas,
        string[128],
        name[24],
        data[128],
        msg[128];
    GetPlayerName(playerid, name, 24);
    if(Informacion[playerid][Faccion] == 1)
        {

    if(sscanf(params, "un", cmdid, estrellas))
        return SendClientMessage(playerid,ROJO,"Uso: /delito [id] [estrellas]");
    if(cmdid == playerid)
        return SendClientMessage(playerid,ROJO,"No te puedes poner cargos tu mismo.");
    if(!IsPlayerConnected(cmdid) || cmdid == INVALID_PLAYER_ID)
        return SendClientMessage(playerid,ROJO,"ID Invalido.");

    new oname[MAX_PLAYER_NAME];
    GetPlayerName(cmdid, oname, sizeof(oname));

    {
        format(string, sizeof(string), "Te an puesto {DE0000}%d{FFFFFF} cargo(s), usa {FFF000}/rendirse{FFFFFF} o huye de la policia.",estrellas);
        format(msg, sizeof(msg), "Le has puesto {DE0000}%d{FFFFFF} cargo(s) a {DE0000}(%s [%i])", estrellas,oname,cmdid);
        SetPlayerWantedLevel(cmdid, estrellas);
        Informacion[cmdid][Carcel] = 1;
        Buscado[cmdid] = 1;
        Marcarjugador(cmdid);  //<----La funcion
    }
    SendClientMessage(cmdid,-1, string);
    SendClientMessage(playerid,-1, msg);
    format(data,sizeof(data),"[Police Chat] %s [%i]: Le he puesto %d cargo(s) a %s.",name,playerid,estrellas,oname);
    MensajePolicia(0x00A3FFFF,data);
        print(string);
    }
    return 1;
}

//y por ultimo el public

public Marcarjugador(showplayerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(cmdid,x,y,z);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(Informacion[i][Faccion] == 1) //<--- Policнa
        {
            if(Logueado[i] == 1)
    {
        SetPlayerMarkerForPlayer( i, showplayerid, AMARILLO );
SetPlayerCheckPoint(playerid,x,y,z,5.0);

        }
    }
    }
}
Lo ъnico que hace es que el player se ponga amarillo y nada mas no enseсa la localizaciуn, espero y me puedan ayudar y gracias de antemano.
haci te sirve?
Reply
#3

Muchas Gracias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)