[SOLVED]
#1

Erm hey guy's i'm realy cunfused with this i've made 2 gates in mta



1 is closed and 1 is shut, Converted it into pawno


Then scripted it but it gets some warnings:


And the /opengate and /closegate don't even work


So please help.. I'm still rly confused



Script GM

Код:
#include <a_samp>
new ChosenClass[MAX_PLAYERS];
new Text:help2;
new gate;

#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

public OnGameModeInit()
{
	help2 = TextDrawCreate(200,300,"I'm sorry but~n~But this skin~n~Is for Jay only");
	
	TextDrawUseBox(help2,1);
	TextDrawBoxColor(help2,0x000000AA);
	SetGameModeText("Blank Script");
	
	gate = CreateObject(980, 1067.2547607422, 1357.7930908203, 12.447257995605, 0.000000, 0.000000, 0.000000); //

	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	
	
	
	
	
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, -1782.5294,539.1637,194.9415);
	SetPlayerFacingAngle(playerid,241.7837);
	SetPlayerCameraPos(playerid, -1776.6428,534.9046,194.9415);
	SetPlayerCameraLookAt(playerid, -1782.5294,539.1637,194.9415);
	ChosenClass[playerid] = classid;
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(ChosenClass[playerid] == 0 && strcmp(PlayerName,"Jay",false) != 0)
  {
	  TextDrawShowForPlayer(playerid,help2);
	  return 0;
	}

	return 1;
}
forward HideTextDraw(playerid); public HideTextDraw(playerid) TextDrawHideForPlayer(playerid,help2);//Put this under OnPlayerRequestSpawn, not in it or in any other callback.


public OnPlayerConnect(playerid)
{  
	return 1;
}

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

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Gates are opening");
MoveObject(gate,1067.6042480469, 1357.6293945313, 7.0842742919922);
return 1;
}

if (strcmp("/closegate", cmdtext, true, 11) == 0)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Gates are closeing");
MoveObject(gate,1067.2547607422, 1357.7930908203, 12.447257995605);
return 1;
}

return 0;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

WARNINGS:
Код:
C:\Users\(lewis)\Desktop\PGS FS & Gm\PGS-V2.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\(lewis)\Desktop\PGS FS & Gm\PGS-V2.pwn(132) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

Reply
#2

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


pawn Код:
MoveObject(gate,1067.6042480469, 1357.6293945313, 7.0842742919922, 1); // The 1 is the speed.
pawn Код:
MoveObject(gate,1067.2547607422, 1357.7930908203, 12.447257995605, 0.5); // You can also make it slower/faster
Reply
#3

Quote:
Originally Posted by Jeffry
https://sampwiki.blast.hk/wiki/MoveObject


pawn Код:
MoveObject(gate,1067.6042480469, 1357.6293945313, 7.0842742919922, 1); // The 1 is the speed.
pawn Код:
MoveObject(gate,1067.2547607422, 1357.7930908203, 12.447257995605, 0.5); // You can also make it slower/faster
Aha thanks Jeffry, I'll try it out and tell you the results
Reply
#4

Yup succes..!

It works thanks Jeffry.




Close this topic [SOLVED]
Reply
#5

No problem.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)