Now go this, is it good?
PHP Code:
// Scripted by *Trakan
//#CLIENTSIDE
function onKeyPressed(keyCode, keyName, scanCode) {
if (keyName == "e") {
if (player.dir == 3 && !indodge) {
freezeplayer(0.8);
setani("gh_gani_roulade", NULL);
set indodge;
for (temp.i = 0; temp.i < 4; temp.i++) {
if (onwall2(player.x+0.5, player.y+1+1, 2, 2)) continue;
player.x += 1;
sleep(.1);
}
sleep(0.5);
unset indodge;
setani("idle", NULL);
}
if (player.dir == 1 && !indodge) {
freezeplayer(0.8);
setani("gh_gani_roulade", NULL);
set indodge;
for (temp.i = 0; temp.i < 4; temp.i++) {
if (onwall2(player.x+0.5, player.y+1+1, 2, 2)) continue;
player.x -= 1;
sleep(.1);
}
sleep(0.5);
unset indodge;
setani("idle", NULL);
}
if (player.dir == 0 && !indodge) {
freezeplayer(0.8);
setani("gh_gani_roulade", NULL);
set indodge;
for (temp.i = 0; temp.i < 4; temp.i++) {
if (onwall2(player.x-0.5, player.y-1-1, 2, 2)) continue;
player.y -= 1;
sleep(.1);
}
sleep(0.5);
unset indodge;
setani("idle", NULL);
}
if (player.dir == 2 && !indodge) {
freezeplayer(0.8);
setani("gh_gani_roulade", NULL);
set indodge;
for (temp.i = 0; temp.i < 4; temp.i++) {
if (onwall2(player.x-0.5, player.y-1-1, 2, 2)) continue;
player.y += 1;
sleep(.1);
}
sleep(0.5);
unset indodge;
setani("idle", NULL);
}
}
}