Hello, I'm making a mod for CS, and I want to include a teleport.
The problem is, I have no idea how to check if a player is stuck, the current code is:
Code:
public blink(id)
{
if (classes[id] == 3 && skills[id][2] == 0 && mana[id]>=BLINK_COST)
{
new blinkorg[3]
new blinkorg2[3]
get_user_origin(id,blinkorg,0)
get_user_origin(id,blinkorg2,3)
if (blinkorg2[0]>=blinkorg[0])
{
blinkorg2[0] = blinkorg2[0] - 30
}
else
{
blinkorg2[0] = blinkorg2[0] + 30
}
if (blinkorg2[1]>=blinkorg[1])
{
blinkorg2[1] = blinkorg2[1] - 30
}
else
{
blinkorg2[1] = blinkorg2[1] + 30
}
blinkorg2[2] = blinkorg2[2] + 30
set_user_origin(id,blinkorg2)
mana[id] = mana[id]-BLINK_COST
}
return PLUGIN_HANDLED
}
I would really appreciate help
__________________
"My mouth is dry... My face is numb..." ~ Brain Stew - Green Day