SA-MP Forums Archive
(GATES) help please - 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: (GATES) help please (/showthread.php?tid=93197)



(GATES) help please - Matthew500 - 23.08.2009

say errors please help

Код:
//==============================================================================
//=================================Gate System==================================
//==============================================================================

#include <a_samp>

new gate1;

#define COLOR_NICEBLUE 0x3C80C4FF
#define COLOR_YELLOW 0xEEDD11FF

public OnGameModeInit()
{
gate1 = CreateObject(1216, 896.882446, 1895.897461, 10.512315, 0.0000, 0.8594, 276.0160);//Parkla gate

return 1;
}

public OnPlayerCommandText(playerid,cmdtext[])

//-----------------------------Lift System End----------------------------------
if(strcmp(cmdtext,"/open-parkla",true)==0)
{
MoveObject(gate1,2107.968506,1982.014404,13.005812,2.00);//cordinates close gate
SendClientMessage(playerid,COLOR_NICEBLUE,"Gate1 Is Open!");
return 1;
}
if(strcmp(cmdtext, "/close-parkla", true) == 0)//open gates
{
MoveObject(gate1,2107.968506, 1970.264893, 13.005812,2.00);//cordinates open gate
SendClientMessage(playerid,COLOR_YELLOW,"Gate1 Is Closed!");
return 1;
}
say errors

Код:
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(28) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(32) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: (GATES) help please - Matthew500 - 23.08.2009

Quote:
Originally Posted by Matthew500
say errors please help

Код:
//==============================================================================
//=================================Gate System==================================
//==============================================================================

#include <a_samp>

new gate1;

#define COLOR_NICEBLUE 0x3C80C4FF
#define COLOR_YELLOW 0xEEDD11FF

public OnGameModeInit()
{
gate1 = CreateObject(1216, 896.882446, 1895.897461, 10.512315, 0.0000, 0.8594, 276.0160);//Parkla gate

return 1;
}

public OnPlayerCommandText(playerid,cmdtext[])

if(strcmp(cmdtext,"/open-parkla",true)==0)
{
MoveObject(gate1,2107.968506,1982.014404,13.005812,2.00);//cordinates close gate
SendClientMessage(playerid,COLOR_NICEBLUE,"Gate1 Is Open!");
return 1;
}
if(strcmp(cmdtext, "/close-parkla", true) == 0)//open gates
{
MoveObject(gate1,2107.968506, 1970.264893, 13.005812,2.00);//cordinates open gate
SendClientMessage(playerid,COLOR_YELLOW,"Gate1 Is Closed!");
return 1;
}
say errors

Код:
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(28) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(32) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: (GATES) help please - Mr_Finnigan - 23.08.2009

Quote:
Originally Posted by Matthew500
Quote:
Originally Posted by Matthew500
say errors please help

Код:
//==============================================================================
//=================================Gate System==================================
//==============================================================================

#include <a_samp>

new gate1;

#define COLOR_NICEBLUE 0x3C80C4FF
#define COLOR_YELLOW 0xEEDD11FF

public OnGameModeInit()
{
gate1 = CreateObject(1216, 896.882446, 1895.897461, 10.512315, 0.0000, 0.8594, 276.0160);//Parkla gate

return 1;
}

public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/open-parkla",true)==0)
{
MoveObject(gate1,2107.968506,1982.014404,13.005812,2.00);//cordinates close gate
SendClientMessage(playerid,COLOR_NICEBLUE,"Gate1 Is Open!");
return 1;
}
if(strcmp(cmdtext, "/close-parkla", true) == 0)//open gates
{
MoveObject(gate1,2107.968506, 1970.264893, 13.005812,2.00);//cordinates open gate
SendClientMessage(playerid,COLOR_YELLOW,"Gate1 Is Closed!");
return 1;
}
  return1;
}
say errors

Код:
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(28) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\xxx\My Documents\servu\pawno\new.pwn(32) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/open-parkla",true)==0)
{
MoveObject(gate1,2107.968506,1982.014404,13.005812,2.00);//cordinates close gate
SendClientMessage(playerid,COLOR_NICEBLUE,"Gate1 Is Open!");
return 1;
}
if(strcmp(cmdtext, "/close-parkla", true) == 0)//open gates
{
MoveObject(gate1,2107.968506, 1970.264893, 13.005812,2.00);//cordinates open gate
SendClientMessage(playerid,COLOR_YELLOW,"Gate1 Is Closed!");
return 1;
}
  return1;
}
Try that