[Help] Player Indicator!
#1

Hey people!
Well, im actually an user of Spanish Section, but anyone answered me so...
Im trying to do this:


In Soanish Section they said me that i have tuuse AttachObjectToPlayer and SetObjectRot with a timer, but i haven't the ID of the Object...

So, if anyone could give me the ID of the object, and an idea of how to use SetObjectRot, i will be grateful!

PD: Sorry for my bad english, im from Argentina and i learned english playing SA:MP and other english games lol.
Reply
#2

Here, all objects you want:

https://sampwiki.blast.hk/wiki/Game_Object_ID_List
Reply
#3

Search for object id 1318.
Reply
#4

Yeah samtey, i know the wiki ¬¬.
But i didn't know the indicator's real name; so i can't search it in Wiki...
Someone tell me that the ID is 1318, but that he wasn't sure. I will try!

PD:
pawn Код:
AttachObjectToPlayer(1318, playerid, 0, 0, 2, 0, 0, 0);
Now, how can i make the rotation? I didn't really understand the SetObjectRot native.
Reply
#5

Sorry for the doble post.
Well, i tryed this:
pawn Код:
new Indicator[MAX_PLAYERS] = 1318;

CMD:objetivo(playerid, params[])
{
    if(!IsPlayerLuxAdmin(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "[Info] Solo los Administradores pueden hacer esto!");
    if(sscanf(params, "d", rid)) return SendClientMessage(playerid, COLOR_YELLOW, "Uso: /objetivo [playerid/name]");
    if(!IsPlayerConnected(rid)) return SendClientMessage(playerid, COLOR_BLUE, "Este jugador no esta conectado");
    else
    {
        AttachObjectToPlayer(Indicator[playerid], playerid, 0, 0, 3, 0, 0, 0);
    }
    return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{

    if(Objetivo[playerid] != 1) return 0;
    else
    {
        Objetivo[playerid] = 0;
        DestroyObject(Indicator[playerid]);
    }
    return 1;
}
My problem is that the object never appears D:.
What is that im doing wrong? :F
Reply
#6

pawn Код:
new Indicator = 1318;

CMD:objetivo(playerid, params[])
{
    if(!IsPlayerLuxAdmin(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "[Info] Solo los Administradores pueden hacer esto!");
    if(sscanf(params, "d", rid)) return SendClientMessage(playerid, COLOR_YELLOW, "Uso: /objetivo [playerid/name]");
    if(!IsPlayerConnected(rid)) return SendClientMessage(playerid, COLOR_BLUE, "Este jugador no esta conectado");
    else
    {
        AttachObjectToPlayer(Indicator, playerid, 0, 0, 3, 0, 0, 0);
    }
    return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{

    if(Objetivo[playerid] != 1) return 0;
    else
    {
        Objetivo[playerid] = 0;
        DestroyObject(Indicator[playerid]);
    }
    return 1;
}
Try this.
Reply
#7

Ok, i will try that Darnell!
Thx.
Reply
#8

No problem, have fun.
Reply
#9

IT's because you didn't create the object.

Try this:

pawn Код:
new Indicator[MAX_PLAYERS];

CMD:objetivo(playerid, params[])
{
    if(!IsPlayerLuxAdmin(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "[Info] Solo los Administradores pueden hacer esto!");
    if(sscanf(params, "d", rid)) return SendClientMessage(playerid, COLOR_YELLOW, "Uso: /objetivo [playerid/name]");
    if(!IsPlayerConnected(rid)) return SendClientMessage(playerid, COLOR_BLUE, "Este jugador no esta conectado");
    else
    {
        Indicator[playerid] = CreateObject(1318, 0,0,0,0,0,0);
        AttachObjectToPlayer(Indicator[playerid], playerid, 0, 0, 3, 0, 0, 0);
    }
    return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{

    if(Objetivo[playerid] != 1) return 0;
    else
    {
        Objetivo[playerid] = 0;
        DestroyObject(Indicator[playerid]);
    }
    return 1;
}
Reply
#10

Ooohh... Thanks Schurman!
I think that the object was going to be created automatically...
Well, thank u all!
If i have any doub, i will post again!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)