29.09.2013, 18:39
I downloaded an automatic LSPD gate system.
When someone is in it's range the gate gets opened.
But I'm creating a RolePlay server so I can't allow everyone to open these gates.
Can anyone add to the filterscript something that'll create new cmds [ /givekey ] [ /takekey ]
and the only ones that has keys will be able to open it..
Or..
Everyone that is in the faction COPS ( police ) will have access to open this gate [ When they're in the range of the gate the gate will open, Civillians/Other factions got no access ]
I prefer the red option...
Thank you whoever is going to help me
When someone is in it's range the gate gets opened.
But I'm creating a RolePlay server so I can't allow everyone to open these gates.
Can anyone add to the filterscript something that'll create new cmds [ /givekey ] [ /takekey ]
and the only ones that has keys will be able to open it..
Or..
Everyone that is in the faction COPS ( police ) will have access to open this gate [ When they're in the range of the gate the gate will open, Civillians/Other factions got no access ]
I prefer the red option...
Thank you whoever is going to help me

Код:
/*============================================================================== gate filterscript by Wade Martin :D Dont remove the credits *=============================================================================== *=============================================================================*/ #define FILTERSCRIPT #define COLOR_YELLOW 0xFFFF00AA #include <a_samp> #include <zcmd> new gate1; new gate2; #if defined FILTERSCRIPT forward close(); public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Gates by Sexc(Wade Martin):p"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" ITS A FILTERSCRIPT"); print("----------------------------------\n"); } #endif public OnGameModeInit() { gate1 = CreateObject(980,1590.36975098,-1638.18310547,15.23138046,0.00000000,0.00000000,0.00000000); gate2 = CreateObject(968,1544.69677734,-1630.78649902,13.07031250,0.00000000,90.00000000,90.00000000); return 1; } CMD:gate(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 5, 1590.36975098,-1638.18310547,15.23138046)) MoveObject(gate1,1590.3804931641,-1637.9333496094,9.4813804626465, 2.00); SetTimer("close", 4000, 0); if(IsPlayerInRangeOfPoint(playerid, 8, 1544.69677734,-1630.78649902,13.07031250)) MoveObject(gate2,1544.6962890625,-1630.7861328125,12.0703125, 2.00); SetTimer("close", 4000, 0); return 1; } public close() { MoveObject(gate1,1590.36975098,-1638.18310547,15.23138046, 3.00); MoveObject(gate2,1544.69677734,-1630.78649902,13.07031250, 3.00); return 1; }