SA-MP Forums Archive
Hey my gate isnt moving without errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hey my gate isnt moving without errors (/showthread.php?tid=300409)



Hey my gate isnt moving without errors - ikbenremco - 30.11.2011

It doens't work .. my previous gates worked !

Quote:

if (strcmp("/openniels", cmdtext, true, 10) == 0) {
if (Player[playerid][Group] == 15) {
if (IsPlayerInRangeOfPoint(playerid, 15, 264.10000610,-1333.09997559,55.00000000)) {
MoveObject(gateniels , 264.10000610,-1333.09997559,49.29999924, 1);
} else {
SendClientMessage(playerid, RED, "You are not closed enough to open this gate");
}
}
return 1;
}




Re: Hey my gate isnt moving without errors - N0FeaR - 30.11.2011

Quote:
Originally Posted by ikbenremco
Посмотреть сообщение
It doens't work .. my previous gates worked !
can you show me all with gateniels?


Re: Hey my gate isnt moving without errors - moadi - 30.11.2011

Quote:
Originally Posted by ikbenremco
Посмотреть сообщение
It doens't work .. my previous gates worked !
Mind posting the errors?


Re: Hey my gate isnt moving without errors - ikbenremco - 30.11.2011

No it's good now changed : CMD:nielsopen(playerid,params[]) {

soemone know how to close it with a timer?


Re: Hey my gate isnt moving without errors - moadi - 30.11.2011

Quote:
Originally Posted by ikbenremco
Посмотреть сообщение
No it's good now changed : CMD:nielsopen(playerid,params[]) {

soemone know how to close it with a timer?
pawn Код:
forward closingtimer();
public closingtimer()
{
MoveObject( coords in here );
return 1;
}


// and in your command's code add something like
SetTimer("closingtimer",time in ms, repeating 1/0);



Re: Hey my gate isnt moving without errors - Thresholdold - 30.11.2011

That won't work... the gate has to be 'Open' for the timer to activate, otherwise it might randomly close the gate when someone is trying to open it.

try and use
forward closingtimer();
public closingtimer()
{
if(gateneilsopen == true)
{
MoveObject(gateneils, Coords)
}

or something like that... I'm a noob scripter but I know that code won't work.