about moveapleobject!
#1

I made this code, but when I open this server as a game mode / filter script, I don't see the gate move.
Help please, if there is any wrong in my code.
Quote:

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif
new swatgate;

public OnGameModeInit()
{

// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(285,2424.5840,-2492.1284,13.6429,157.9679,0,0,0,0,0,0); //

swatgate = CreateObject(980, 2429.60864, -2506.03540, 15.14137, 0.00000, 0.00000, 351.90863); //closed

return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid)
{

return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

CMDpen(playerid, params[])
{
{
new skin;
skin = GetPlayerSkin(playerid);
if(skin == 285)
{
MoveObject(swatgate,2429.60864, -2506.03540, 20.31362,-1); //opened " CreateObject(980, 2429.60864, -2506.03540, 20.31362, 0.00000, 0.00000, 351.90863); "
}
return 1;
}


}

CMD:close(playerid, params[])
{
{
new skin;
skin = GetPlayerSkin(playerid);
if(skin == 285)
{
MoveObject(swatgate,2429.60864, -2506.03540, 15.14137,-1); //closed CreateObject(980, 2429.60864, -2506.03540, 15.14137, 0.00000, 0.00000, 351.90863);
}
return 1;
}


}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)