Quote:
Originally Posted by Jeffyy
PHP Code:
//#CLIENTSIDE
function onCreated() enabledefmovement();
function onPlayerChats()
{
if (player.chat == "/car")
{
onCreated();
this.car = !this.car;
if (this.car) onTimeOut();
if (!this.car) setTimer( .5 );
}
}
function onTimeOut()
{
disabledefmovement();
showimg( 1, "<image name>", player.x, player.y );
findimg( 1 ).rotation = this.ang;
if ( keydown( 3 ) )
{
this.ang -= .1;
timeout;
}
if ( keydown( 1 ) )
{
this.ang += .1;
timeout;
}
if ( keydown( 0) )
{
player.x -= cos( this.ang ) * 1;
player.y += sin( this.ang ) * 1;
}
setTimer( 0.05 );
}
temp.newx = player.x + (this.graalspeed * cos(this.angle));
temp.newy = player.y + (this.graalspeed * -sin(this.angle));
function Accelerate()
{
this.smod = 0;
this.speed += (this.speed < this.maxspeed) ? .20 : 1;
}
function LeftTurn()
{
this.angle += degtorad(this.turnpower);
timeout;
if (radtodeg(this.angle)+this.turnpower <= 0)
{
this.angle = degtorad(360);
}
if (radtodeg(this.angle)+this.turnpower >= 360)
{
this.angle = degtorad(0);
}
}
function RightTurn()
{
this.angle -= degtorad(this.turnpower);
if (radtodeg(this.angle)+this.turnpower >= 360)
{
this.angle = degtorad(359);
}
if (radtodeg(this.angle)+this.turnpower <= 0)
{
this.angle = degtorad(360);
}
}
Fixed it up and tried it, Works great. Have fun :]
|
Can you read... All I said was that "I FIXED IT UP A ABIT." There are no Fancy functions... I don't think.