#include <a_samp> new Openlagate; public OnFilterScriptInit() { Openlagate = CreateObject(980, 1762.1135253906, -1693.2562255859, 15.201999664307, 0, 0, 266.70568847656); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/opencpg", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid, 10.0, 1762.1135253906, -1693.2562255859, 15.201999664307)) { MoveObject(Openlagate, 1761.650390625, -1700.6632080078, 15.200605392456, 4); SendClientMessage(playerid, 0xFFFFFF, "You've opened the crime place gate"); } return 1; } if (strcmp("/closecpg", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid, 10.0, 1762.1135253906, -1693.2562255859, 15.201999664307)) { MoveObject(Openlagate, 1762.1135253906, -1693.2562255859, 15.201999664307, 4); SendClientMessage(playerid, 0xFFFFFF, "You've closed the crime place gate"); } return 1; } return 0; }
if(gTeam[playerid] == TEAM_COP)
Originally Posted by manunited1878
What is GTEAMS?
|
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/opencpg", cmdtext, true, 10) == 0)
{
if(GetPlayerTeam(playerid) == TEAM_MAFIA) // change the 'TEAM_MAFIA' to how you defined it.
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1762.1135253906, -1693.2562255859, 15.201999664307))
{
MoveObject(Openlagate, 1761.650390625, -1700.6632080078, 15.200605392456, 4);
SendClientMessage(playerid, 0xFFFFFF, "You've opened the crime place gate");
}
}
return 1;
}
if (strcmp("/closecpg", cmdtext, true, 10) == 0)
{
if(GetPlayerTeam(playerid) == TEAM_MAFIA) // again, change it!
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1762.1135253906, -1693.2562255859, 15.201999664307))
{
MoveObject(Openlagate, 1762.1135253906, -1693.2562255859, 15.201999664307, 4);
SendClientMessage(playerid, 0xFFFFFF, "You've closed the crime place gate");
}
}
return 1;
}
return 0;
}
Originally Posted by VonLeeuwen
pawn Код:
|
Gateteam.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText") Gateteam.pwn(3) : error 017: undefined symbol "strcmp" Gateteam.pwn(5) : error 017: undefined symbol "GetPlayerTeam" Gateteam.pwn(7) : error 017: undefined symbol "IsPlayerInRangeOfPoint" Gateteam.pwn(9) : error 017: undefined symbol "MoveObject" Gateteam.pwn(10) : error 017: undefined symbol "SendClientMessage" Gateteam.pwn(15) : error 017: undefined symbol "strcmp" Gateteam.pwn(17) : error 017: undefined symbol "GetPlayerTeam" Gateteam.pwn(19) : error 017: undefined symbol "IsPlayerInRangeOfPoint" \Gateteam.pwn(21) : error 017: undefined symbol "MoveObject" Gateteam.pwn(22) : error 017: undefined symbol "SendClientMessage" Gateteam.pwn(28) : error 030: compound statement not closed at the end of file (started at line 3) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Errors.
if (strcmp("/opencpg", cmdtext, true, 10) == 0)
{
if(GetPlayerTeam(playerid) == TEAM_MAFIA) // change the 'TEAM_MAFIA' to how you defined it.
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1762.1135253906, -1693.2562255859, 15.201999664307))
{
MoveObject(Openlagate, 1761.650390625, -1700.6632080078, 15.200605392456, 4);
SendClientMessage(playerid, 0xFFFFFF, "You've opened the crime place gate");
}
}
return 1;
}
if (strcmp("/closecpg", cmdtext, true, 10) == 0)
{
if(GetPlayerTeam(playerid) == TEAM_MAFIA) // again, change it!
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1762.1135253906, -1693.2562255859, 15.201999664307))
{
MoveObject(Openlagate, 1762.1135253906, -1693.2562255859, 15.201999664307, 4);
SendClientMessage(playerid, 0xFFFFFF, "You've closed the crime place gate");
}
}
return 1;
}
Originally Posted by VonLeeuwen
Yes you can, I'll try to make something soon, one second.
Take a look at this: http://pawn.pastebin.com/m6d9bafd Just copy and paste it into Pawn, and save it as filterscript. |
\test.pwn(40) : error 017: undefined symbol "TEAM_COP" \test.pwn(47) : warning 217: loose indentation \test.pwn(50) : error 010: invalid function or declaration \test.pwn(52) : error 010: invalid function or declaration \test.pwn(54) : error 010: invalid function or declaration \test.pwn(60) : error 010: invalid function or declaration \test.pwn(62) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.