I have started to make scripts with relative success, but this one is breaking my schemes !!! Hahaha! I do not pretend something very complex, I have humbly come here ...
function pagadrink_main(e)
PlayerDX = g_Entity[e]['x'] - g_PlayerPosX;
PlayerDY = g_Entity[e]['y'] - g_PlayerPosY;
PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;
PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ));
if PlayerDist < 80 then
Prompt ("Presione [E] para tomar una");
if g_KeyPressE == 1 and currentcash >= 100 then
Thirst = Thirst + 1000;
currentcash = currentcash - 100
end
else Prompt ("Lamentablemtente no tienes cash");
end
end
help with script: vending machine
I've been with a script for hours that should let us drink a can if we have money, get rid of thirst and money (100) and if we do not have money to say it ... I have this and I can not make it go ... Any advice Geniuses of Scripting ????
THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
The game is a serious thing (El juego es una cosa seria)