12.07.2012, 10:16
Hello
Can i have a help please?i need a gate system.. with /open and /close.. please help me...
please
Can i have a help please?i need a gate system.. with /open and /close.. please help me...
please
#include <a_samp> if(strcmp(cmdtext,"/opengate", true) == 0) { if (gTeam[playerid] == TEAM_GROVE) { if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097)) { MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00); return 1; } } } if(strcmp(cmdtext,"/closegate", true) == 0) { if (gTeam[playerid] == TEAM_GROVE) { if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097)) { MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00); return 1; } } }
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/opengate", true) == 0)
{
if (gTeam[playerid] == TEAM_GROVE)
{
if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097))
{
MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00);
return 1;
}
}
}
if(strcmp(cmdtext,"/closegate", true) == 0)
{
if (gTeam[playerid] == TEAM_GROVE)
{
if(PlayerToPoint(15.0, playerid,1706.4076,1607.4928,10.0097))
{
MoveObject(gate, 980, 1705.96, 1607.40, 12.06, 0.00, 0.00);
return 1;
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/opengate", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 15,1706.4076,1607.4928,10.0097))
{
MoveObject(gate, 1705.96, 1607.40, 12.06, 0.00, 0.00,0.00);
return 1;
}
}
if(strcmp(cmdtext,"/closegate", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 15,1706.4076,1607.4928,10.0097))
{
MoveObject(gate, 1705.96, 1607.40, 12.06, 0.00, 0.00, 0.00);
return 1;
}
}
return 1;
}
F:\test.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText") F:\test.pwn(3) : error 017: undefined symbol "strcmp" F:\test.pwn(5) : error 017: undefined symbol "IsPlayerInRangeOfPoint" F:\test.pwn(7) : error 017: undefined symbol "MoveObject" F:\test.pwn(8) : warning 217: loose indentation F:\test.pwn(12) : error 017: undefined symbol "strcmp" F:\test.pwn(14) : error 017: undefined symbol "IsPlayerInRangeOfPoint" F:\test.pwn(16) : error 017: undefined symbol "MoveObject" F:\test.pwn(17) : warning 217: loose indentation F:\test.pwn(22) : error 054: unmatched closing brace ("}") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.