ok thanks another question can someone tell me how to make a /goto or /gethere command i did this but it doesnt work
function GetPlayerHere(theplayer, command, otherplayer)
local x, y, z = getElementPosition(theplayer)
succes = setElementPosition(otherplayer, x, y, z)
if(succes) then
outputChatBox("succes", theplayer)
else
outputChatBox("fail", theplayer)
end
end
addCommandHandler("gethere", GetPlayerHere)
function GoToPlayer(theplayer, command, otherplayer)
local x, y, z = getElementPosition(otherplayer)
succes = setElementPosition(theplayer, x, y, z)
if(succes) then
outputChatBox("succes", theplayer)
else
outputChatBox("Fail", theplayer)
end
end
addCommandHandler("goto", GoToPlayer)
it gives me the "fail" message always why? thanks please give me the right one please
-------------------------------------------------------------
edit:
the first question is still going on so please answer it too
another question is how to make a function happens on a certain time or a fucntion that goes arround and arround if someone know samp i mean a SetTimer something like this i thought of
local hour, min = getTime()
and i was gonna do like this
if(min == 30) then
but then i i remembered that it must be with an event so i wanna know how to make something that checks like a function that happens each 5 min or any other timer if you didnt get it tell me i will explain