вот код:
#include <a_samp>
forward New(playerid);
new obj0;
new obj1;
new Float:X0,Float:Y0,Float:Z0;
new Float:X1,Float:Y1,Float:Z1;
new Float:Xp,Float:Yp,Float:Zp;
new Float:x,Float:y,Float:z;
new n;
public OnPlayerConnect(playerid)
{
GameTextForAll("–Oѓ CмA†ЊEPA",500,1);
//Other stuff
return 1;
} public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext, "/ship", true) == 0){
GetPlayerPos(playerid,x,y,z);
obj0 = CreateObject(8493,x+10,y,z+14,0,0,0);
obj1 = CreateObject(9159,x+10,y,z+14,0,0,0);
GetObjectPos(obj0,X0,Y0,Z0);
GetObjectPos(obj1,X1,Y1,Z1);}
if(strcmp(cmdtext, "/sit", true) == 0){
SetTimer("New",1,1);}
if(strcmp(cmdtext, "/go", true) == 0){
MoveObject(obj0,X0,Y0*100,Z0,10.0);
MoveObject(obj1,X1,Y1*100,Z1,10.0);}
if(strcmp(cmdtext, "/stop", true) == 0){
for (n=1;n<=1000;n++){
KillTimer(n);}
StopObject(obj1);
StopObject(obj0);}
if(strcmp(cmdtext, "/+", true) == 0){
MoveObject(obj0,X0,Y0,Z0*100,3.0);
MoveObject(obj1,X1,Y1,Z1*100,3.0);}
if(strcmp(cmdtext, "/-", true) == 0){
MoveObject(obj0,X0,Y0,-Z0*100,3.0);
MoveObject(obj1,X1,Y1,-Z1*100,3.0);}
public New(playerid)
{
GetObjectPos(obj0,Xp,Yp,Zp);
SetPlayerPos(playerid,Xp,Yp-34,Zp-8);
return 1;
}