12.11.2010, 02:22
try this
make sure to change the color and range to what you want
Код:
command(gateo, playerid, params[]) { if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4) { if(PlayerToPoint(15.0, playerid,-210.80146790, 999.80938721, 20.4211692) { MoveDynamicObject(lspdgate, -218.80146790, 1007.80938721, 0.42116928, 1); for (new i = 0; i != MAX_PLAYERS; ++i) { if (IsPlayerConnected(i)) { if(PlayerToPoint(50.0, playerid,-210.80146790, 999.80938721, 20.4211692)) //Set Distance for Messege { new name[MAX_PLAYER_NAME], string[100]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "*%s uses a small remote to open the gates.",name); SendClientMessage(i, COLOR_GREEN, string); } } } return 1; } } } command(gatec, playerid, params[]) { if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4) { if(PlayerToPoint(15.0, playerid,-210.80146790, 999.80938721, 20.4211692) { MoveDynamicObject(lspdgate, -218.80146790, 1007.80938721, 20.42116928, 1); for (new i = 0; i != MAX_PLAYERS; ++i) { if (IsPlayerConnected(i)) { if(PlayerToPoint(50.0, playerid,-210.80146790, 999.80938721, 20.4211692)) //Set Distance for Messege { new name[MAX_PLAYER_NAME], string[100]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "*%s uses a small remote to open the gates.",name); SendClientMessage(i, COLOR_GREEN, string); } } } return 1; } } }