22.02.2012, 18:20
Try this;
pawn Код:
if( !strcmp( "/washcar", cmdtext, true, 8 ) )
{
if( !IsPlayerInAnyVehicle( playerid ) )
return SendClientMessage( playerid, COLOR_RED, "ERROR: you are not in a Vehicle!" );
GivePlayerMoney( playerid, -40 );
SendClientMessage( playerid, COLOR_RED, "you have paid $40 to wash your car" );
SendClientMessage( playerid, COLOR_RED, "now drive in the red marker to wash your car" );
MoveObject( entrance, 2499.50000000, -1460.00000000, 29.70000076, 10.0, 292.00000000, 0.00000000, 89.99450684 );
SetTimer( "CloseEntrance", 5000, false );
SetPlayerCheckpoint( playerid, 2455.2258, -1461.0040, 24.0000, 3.0 );
return 1;
}
pawn Код:
forward CloseEntrance();
public CloseEntrance()
{
MoveObject( entrance, 2499.50000000, -1460.00000000, 29.70000076, 10.0, 0.00000000, 0.00000000, 89.99450684 );
return 1;
}