Teams open a gate[have gate script]
#9

You have 'public OnPlayerCommandText(playerid,cmdtext[])' twice in the script, delete the one you just created, and add this at the other one:

pawn Код:
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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)