PDA

نسخه کامل مشاهده نسخه کامل : - سلام ميشه يكي كمكم كنه ممنون؟



Iran_enerjhi
14-03-2007, 02:04
- سلام ميشه اين سوال رو يكي جواب بده ؟

- كد براي ماشين كه آمپر كيلومتر هم داشته باشه ممنون ميشم اگه يكي كمكم كنه.

Iran_enerjhi
16-03-2007, 01:20
اينم كد موس :

===========>>>



Bmap arrow = <arrow.pcx>;//Mausgrafik
Function mouse_fun
{
while(1)
{
mouse_map=arrow; //Maus bekommt die richtige Grafik
mouse_mode=1; //Maus wird aktiviert
mouse_pos.x = Pointer.x;
mouse_pos.y = Pointer.y;
wait(1);
}
}

Iran_enerjhi
16-03-2007, 01:28
اينم كد ماشين كه از تو همين سايت برداشتم يسري تغييرات دادم (از دوست عزيزم آقاي محسن هم تشكر مي كنم) البته صداش يكمكي ايراد داره:

===========>>>>>



var Video_mode =6;
var video_depth = 32 ;
var speed = 0 ;
//////////////////Sound\\\\\\\\\\\\\\\\\\\\\
SOUND car_Sound,<car.wav>;
SOUND car_Stop_Sound,<Stop.wav>;
SOUND car_Horn_Sound,<Horn.wav>;
////////////////////////////////////
action mohsen {
while(1){
wait(1);
ent_move(vector(0,speed,0),nullvector);
if(key_w == on ){
play_sound(car_Sound ,66 );
speed += .020000010 ;
chase_camera(my);
}
if (key_w==off){
speed -= (speed/900) ;
if (speed < .5){
play_sound(car_Sound ,10 );
speed = 0;
}
if(key_f==on ){
play_sound(car_Horn_Sound ,15 );
}

if(key_s==on && speed/300){
ent_move (vector(0,-1,0),Nullvector);
play_sound(car_Stop_Sound ,3 );
}
if(key_m==on && speed/300){
speed +=(speed/3);

}
}
if (key_space ==on){
speed -=(speed/20);
play_sound(car_Sound ,10 );
}
if(key_a==on && speed> 0){
my.pan += (speed/8) ;
}
if(key_d==on && speed>0){
my.pan -= (speed/8) ;
}
if ( speed > 5 ){
speed == 5 ;
}
}
}
// A camera is hunting a target and turns with them. The target is always in the middle of the views
var cam_dist[3] = 0,-200,60; // xyz Distance of the camera towards the target
function chase_camera(target)
{
my = target; // The target Entity
// calculate the camera view's direction angle to the target
var cam_ang[3]; // direction angle of the camera to the target.
vec_diff(temp,nullvector,cam_dist);
vec_to_angle(cam_ang,temp);
cam_ang.roll = 0; // roll didn't change vec_to_angle
// permanent updating of the camera's position and angle
while (1)
{
// place the camera at the right position to the target
vec_set(camera.x,cam_dist);
vec_rotate(camera.x,my.pan);
vec_add(camera.x,my.x);
// Set the camera angles to the camera view direction
vec_set(camera.pan,cam_ang);
// and rotate it about the target angle
ang_add(camera.pan,my.pan);
wait(1);
}
}