SA-MP Forums Archive
[HELP] Object don't move. why not? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Object don't move. why not? (/showthread.php?tid=67948)



[HELP] Object don't move. why not? - Battlaman - 05.03.2009

Hello,

I have make a filterscript with a gate next to the lspd.
But the object don't move..
Is something wrong?

Quote:

#include <a_samp>
#define COLOR_GREEN 0x00FF00AA

new Poort;

main()
{
print("n00000000000000000000000000000000");
print("LSPD Gate");
print("00000000000000000000000000000000n");
}


public OnGameModeInit()
{
SetGameModeText("TutorialGameMode");
AddPlayerClass(93, 2494.4888, -1675.5619, 13.3359, 55.9011,0,0,0,0,0,0);
//CreateObject(id, X, Y, Z, X-rotatie, Y-rotatie, Z-rotatie);
Poort = CreateObject(969, 1547.073730, -1631.926880, 12.549690, 0.0000, 0.0000, 90.0000);
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,-812.0018,-1949.3617,9.3004); // Waar de speler te zetten voor het spawn-menu
SetPlayerCameraPos(playerid,-816.4528,-1945.0082,9.0269); // Camera voor het spawn-menu
SetPlayerCameraLookAt(playerid,-812.0018,-1949.3617,9.3004); // Waar moet de camera naar toe kijken?
return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/open", cmdtext, true, 10) == 0) //Invoer van het commando
{
MoveObject(Poort, 1535.0, -1622.7, 12.5, 0);
SendClientMessage(playerid, COLOR_GREEN, "De poort is nu geopend.");
return 1;
}

if (strcmp("/close", cmdtext, true, 10) == 0)
{
MoveObject(Poort, 1547.0, -1631.9, 12.5, 0);
SendClientMessage(playerid, COLOR_GREEN, "De poort is nu gesloten.");
return 1;
}

return 0;
}




Re: [HELP] Object don't move. why not? - [RP]Rav - 05.03.2009

use OnFilterScriptInit


Re: [HELP] Object don't move. why not? - Nubotron - 05.03.2009

Your move speed is 0.. -_-


Re: [HELP] Object don't move. why not? - Battlaman - 05.03.2009

Quote:
Originally Posted by Rav
use OnFilterScriptInit
Sorry i don't understand. there is not: OnFilterScriptInit


Re: [HELP] Object don't move. why not? - Battlaman - 05.03.2009

Quote:
Originally Posted by Nubotron
Your move speed is 0.. -_-
where do you see ''move speed'' ?


Re: [HELP] Object don't move. why not? - Nubotron - 05.03.2009

The last parameter of MoveObject. It should be different than 0 to be able to move!


Re: [HELP] Object don't move. why not? - Battlaman - 05.03.2009

Quote:
Originally Posted by Battleman
Quote:
Originally Posted by Nubotron
Your move speed is 0.. -_-
where do you see ''move speed'' ?
Can you copy it and let me see with that text Bold


Re: [HELP] Object don't move. why not? - [RP]Rav - 05.03.2009

Quote:
Originally Posted by Battleman
Quote:
Originally Posted by Rav
use OnFilterScriptInit
Sorry i don't understand. there is not: OnFilterScriptInit
replace OnGameModeInit() with OnFilterScriptInit()


Re: [HELP] Object don't move. why not? - Battlaman - 05.03.2009

Quote:
Originally Posted by Nubotron
The last parameter of MoveObject. It should be different than 0 to be able to move!
Can copy the code and fix it?
Then i can see what you have changed.


Re: [HELP] Object don't move. why not? - Hot - 05.03.2009

https://sampwiki.blast.hk/wiki/MoveObject