Object Command
#1

hey all im having a problem im doing a /object command so it when i create the object haves to attach the object to me but it dont attach with my code so im going to post here if any guy know plz correct it
pawn Код:
dcmd_object(playerid, params[])
{
    new string2[256];
    new tmp[256];
    new Index;
    tmp = strtok(params,Index);
    new id;
    id = strval(tmp);
    if(PlayerInfo[playerid][pAdmin] <= 1) return SendClientMessage(playerid,0xFFFFFFFF,"(Admin System): Sir we donґt know you, you arenґt autorized to use that CMD");
    if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /object [Model]");
    {
        format(string2, sizeof(string2), "** You created the object %d near you! **",id);
        SendClientMessage(playerid,COLOR_ORANGE, string2);
        new Float:CarX,Float:CarY,Float:CarZ;
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,CarX,CarY,CarZ);
        new HAH;
        HAH = CreateDynamicObject(id,CarX+3,CarY,CarZ,0,0,0);
        SetDynamicObjectPos(HAH,CarX+3,CarY,CarZ);
        AttachDynamicObjectToPlayer(HAH,playerid,X,Y,Z,0,0,0);
    }
    return 1;
}
im using Y_Objects but if you can do it in normal (Pawno) its okay
thanks for see DarK TeaM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)