How Avoid From Attaching 2 Same Player Objects...
#1

Hello, How can i make that if player has attached one Object and im going to attachment menu and selecting that same playerobject again it should not be attached with old one. old one should be deleted or there should be message you are already wearing this item/Object/Cloth/Attahment....

Help Please.
Reply
#2

You're probably referring towards the RemovePlayerAttachedObject function.
Reply
#3

no it removes objects according to bones.. i want to make if id 1 is used in anyother slot you can not use id 1 again...
Reply
#4

can you help me to make function to save object ids....
like isvalidplayerobject...
we make our function
isplayerobjectattached
and when we wear object it saves object id for player and when he wear it again it says you are already wearing object.
Reply
#5

can't we make like tis?

Quote:

stock IsGroupTaken(grpname[])
{
for(new x; x < MAX_GROUPS; x++)
{
if(Groupinfo[x][active] == 1)
{
if(!strcmp(grpname, Groupinfo[x][grname], true) && strlen(Groupinfo[x][grname]) != 0) return 1;
}
}
return 0;
}

help please
Reply
#6

This is an example that checks if (ID: 3) is on the player and allows them to remove it if so.

Код:
if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) 
        {
            RemovePlayerAttachedObject(playerid, 3);
            SendClientMessage(playerid, -1, "The object has been removed.");
        }
Also, if you want it to save. You must make it an enum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)