danifer
-
Posts
14 -
Joined
-
Last visited
Posts posted by danifer
-
-
anyone ? is there some script already available that uses these events without the problems I've experienced?
-
local healthPickup = createPickup ( x, y , z, pickupType, amount, respawn )
pickup is created fine and when I walk over it , it dissappears and reappears after given respawn time. Like it should. And my health increases of course.
when I hook onPickupUse or onPickupHit (not both at the same time) I run into problems. Tried both.
In the event handler function I sent a msg to the chatbox telling what the user picked up, but I always get two messages like the event was triggered
twice. How is this possible ? Since it dissappears , you shouldn't be able to pick a pickup more than once , right? Until it respawns.
Another thing, first I sat pickupType to integer 0 since I first read this in the wiki for the function createPickup which said an integer value, then I read the wiki for the element Pickup and what I gathered there was
that it was supposed to be set to the string "health".
only difference between those were
first scenario wrote out this...twice: (using pickupType = "health")
"you picked up 100 health "
second scenario wrote out (using pickupType = 0):
"you picked up 100 health" and then "you picked up 0 melee"
What am I doing wrong?
Thanks!
-
Thanks alot guys!
-
thanks alot man! Is there any other banks you know of ?
-
for instance you could create commands with addCommandHandler() that only accepted special commands from only a certain account, using the getPlayerAccount(), that is you, the admin.....maybe?
I haven't looked into this so I don't if this is the best way to go, but it would work.
-
I don't think this was any easier to find buildings with, than driving around the map in a car ...
does anyone know where bank buildings are located ?
-
-
you're welcome!
-
is there any list of buildings in San Andreas and their whereabouts?
I'm especially looking for Bank buildings but I can't remember where they are and its tough to drive around looking for them.
Any lists or graphical maps out there?
Thanks!
-
sounds like notepad++ can intererpt single linebreaks (lf) and windows linebreaks (crlf) but notepad can only do windows.
what Ive read \n should translate to the systems respective linebreak sequence..but it looks like its not.
try this instead
\r\n
or
\n\r
or perhaps
\x0D\x0A
-
Thanks Jumba.
I guess I will have to hook one of those events and set the health with the setElementHealth function.
-
Try this:
function logPlayerPos( player ) local x,y,z = getElementPosition( player ) outputServerLog ( "Position (x,y,z) => " .. x .. " , " .. y .. " , " .. z) outputChatBox ( "Your Position (x,y,z) => " .. x .. " , " .. y .. " , " .. z, player) end addCommandHandler ( "savepos", logPlayerPos)
This will log your current position to \server\mods\deathmatch\logs\server.log
-
I have created a health pickup with a script. I can see the pickup at specified location, but when I take it I gain no health.
Do I have to handle the onPickupHit / onPickupUse and change the health explicitly ? Or is it a bug ?
health pickup question
in Scripting
Posted
the setElementHealth() was not needed. I had some funky arguments to the createPickup() function that caused this erra.