Gate problem - 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: Gate problem (
/showthread.php?tid=126053)
Gate problem -
buljons - 06.02.2010
Ok i did everything like in tutorial:
http://pastebin.com/d605b7bf
But it still gives me 2 errors:
(1
: warning 209: function "OnPlayerCommandText" should return a value
(1
: error 010: invalid function or declaration
(21) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Gate problem -
Fj0rtizFredde - 06.02.2010
Here is a quick fix for you
pawn Код:
#include <a_samp>
new elevator;
public OnGameModeInit()
{
elevator = CreateObject( 987 , 2727.0444335938, -1150.2025146484, 68.4140625 , 0.000000 , 0.000000 , 358.000000 );
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/d2up", true) == 0)
{
MoveObject(elevator,2727.0439453125, -1150.2021484375, 73.439033508301,2.00); // Put your cords in here
return 1;
}
if(strcmp(cmdtext, "/d2down", true) == 0)
{
MoveObject(elevator,2727.0444335938, -1150.2025146484, 68.4140625,2.00); // Same deal as before
return 1;
}
return 0;
}
Re: Gate problem -
buljons - 07.02.2010
Thanks!