23.06.2014, 00:36
Hey. I just recently made a script for rp server which is a parking lot that I mapped out as well. now what the problem is: I forwarded "close" as a timer of course. if I do uh. it's easier to explain with script, look:
This is supposed to be a timer which will move parking lot gate to it's place when it runs out ( 4 seconds )
Now the script of parking lot:
The gate seems to move but like there is a replica that just stands there and does nothing. What do I do?
Код:
public close() { new pgate = CreateObject(2933,1717.0000000,1308.0000000,11.5000000,0.0000000,0.0000000,90.0000000); MoveObject(pgate, 1717.0000000,1308.0000000,11.5000000, 5); return 1; }
Now the script of parking lot:
Код:
CMD:parkinglot(playerid, params[]) { new pgate = CreateObject(2933,1717.0000000,1308.0000000,11.5000000,0.0000000,0.0000000,90.0000000); new pstate = GetPlayerState(playerid); if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to park your car here!"); if(pstate == PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, COLOR_RED, "You're not in a vehicle!"); MoveObject(pgate, 1717.0000000,1308.0000000,1.5000000, 5); SetTimer("close",3000,0); return 1; }