17.02.2011, 14:28
Hey im trying to make a boat to a island... But i got a problem... It does go to the island but if it tries to go back it goes back 5 meter then it got punched back to the island and i can find any fail in this code? :S
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
//Moving Timers
#define timer1 1000*60*3
#define timer2 1000*60*6
//news
new ship1;
//forwarders
forward shipmoving();
forward shipback();
public OnFilterScriptInit()
{
ship1 = CreateObject(10771,2750.78759766,810.22570801,17.48415947,0.00000000,0.00000000,270.75000000); //object(carrier_hull_sfse) (1)
SetTimer("shipmoving", timer1, true);
return 1;
}
public shipmoving()
{
MoveObject(ship1,2780.78759766,810.22570801,17.48415947, 7);
printf("Boat is moving!");
}
public shipback()
{
MoveObject(ship1,2750.78759766,810.22570801,17.48415947, 7);
printf("Boat is moving");
}