04.07.2013, 13:55
(
Последний раз редактировалось maxpain43; 06.07.2013 в 19:18.
)
I'm trying to make a simple moving gate object, the barrier of the LSPD, After doing some coding,
besides moving up and down he moves one time up, then down left then he just switching Z, everytime im doing the command again /gate.
here's the script can you tell what's wrong? :
either this doesn't work.. there is no errors, just a few warnings about 'number of arguments does not match definition' if i'm doing SetObjectRot, which isn't working well like the MoveObject.
besides moving up and down he moves one time up, then down left then he just switching Z, everytime im doing the command again /gate.
Код:
new pdbarriergateobj; //pdgate barrier object
Код:
new pdgatebar = 0;
Код:
pdbarriergateobj = CreateDynamicObject(968, 1544.681640625, -1630.8924560547, 13.3, 180, 90, 90);
Код:
else if(IsPlayerInRangeOfPoint(playerid,9,1544.4913,-1627.2817,13.3828)) { //POLICE BAR if(!IsACop(playerid) || IsAnAgent(playerid)) return SendClientMessage(playerid,COLOR_GREY," You are not a member of the LSPD / SASD / FBI !"); if(pdgatebar==0) { pdgatebar = 1; MoveDynamicObject(pdbarriergateobj, 1544.681640625, -1630.8924560547, 13.3, 180, 180, 90, 1.5); format(string, sizeof(string), "* %s Pushes the button on their remote to Open/Close the gate.", sendername); return 1; } else if(pdgatebar==1) { pdgatebar = 0; MoveDynamicObject(pdbarriergateobj, 1544.681640625, -1630.8924560547, 13.3, 180, 90, 90, 1.5); format(string, sizeof(string), "* %s Pushes the button on their remote to Open/Close the gate.", sendername); return 1; } }
Код:
if(newstate & KEY_CROUCH && !(oldstate & KEY_CROUCH)) //horn gates { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(PlayerToPoint(playerid,9,1544.4913,-1627.2817,13.3828)) //near barrier { if(!IsACop(playerid) || IsAnAgent(playerid)) return SendClientMessage(playerid,COLOR_GREY," You are not a member of the LSPD / SASD / FBI !"); { if(pdgatebar == 0) { pdgatebar = 1; MoveDynamicObject(pdbarriergateobj, 1544.681640625, -1630.8924560547, 13.3, 180, 180, 90, 1.5); format(string, sizeof(string), "* %s Pushes the button on their remote to Open/Close the gate.", sendername); return 1; } else if(pdgatebar==1) { pdgatebar = 0; MoveDynamicObject(pdbarriergateobj, 1544.681640625, -1630.8924560547, 13.3, 180, 90, 90, 1.5); format(string, sizeof(string), "* %s Pushes the button on their remote to Open/Close the gate.", sendername); return 1; } } } } }