29.10.2008, 14:16
Quote:
Originally Posted by yugokoral
...
|
pawn Код:
#include <a_samp>
forward rotation();
new rottimer;
new zapornice;
new bool:rotate;
public OnGameModeInit()
{
zapornice = CreateObject(968, -1572.203613, 658.795593, 6.918911, 0.000000, 0.000000, 90.000000);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/skok", true))
{
if(rotate == true) return 1;
rottimer = SetTimer("rotation", 100, 1);
rotate = true;
return 1;
}
return 0;
}
public rotation()
{
if(rotate == false) return 1;
//
new Float:rotx, Float:roty, Float:rotz;
GetObjectRot(zapornice, rotx, roty, rotz);
SetObjectRot(zapornice, rotx, roty+0.1, rotz);
//
if(roty == 90.0)
{
KillTimer(rottimer);
rotate = false;
}
return 1;
}