Hello im trying to fix this that when player use hammer on wood block on door it should get destroyed but dont understand witch callback i should have :S
(01-06-2012, 08:23 PM)jessehmusic Wrote: [ -> ]Hello im trying to fix this that when player use hammer on wood block on door it should get destroyed but dont understand witch callback i should have :S
have you tried
AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy); ?
Hey my mind is blank what im gonna have in "string& asName"
(01-06-2012, 08:31 PM)jessehmusic Wrote: [ -> ]Hey my mind is blank what im gonna have in "string& asName"
try this just use ""
because i don't think it needs a internal name
Okey ty but i dont get the hammer to work on a woodenblock :S this is the script i found on wiki
"void OpenDoor(string &in item, string &in door)
{
SetSwingDoorLocked(Woodenblock, false, true);
PlaySoundAtEntity("", "unlock_door", Woodenblock, 0, false);
RemoveItem(Hammer);
}"
Is that right
always remember you need to have "" on strings for example "woodenblock" and not woodenblock. Strings need a " on each side to work
yeah i have it to work but the game says" Cant use that item that way"
(01-06-2012, 08:54 PM)jessehmusic Wrote: [ -> ]yeah i have it to work but the game says" Cant use that item that way"
Can I see your whole script?