16.02.2010, 18:04
i need that just teams can open the gate like just police can open it, i have the gate script:
Код:
#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; }