28.07.2013, 10:48
Hello everybody !
I make`d a command, /enter but don`t work...
I can enter only in house.When i try to enter in a business tell me : This is not a house... and at faction hq give me this message..What it`s wrong ??
And 2...
How can i create a simple command for teleport ? SetPlayerPos and SetPlayerInt..i need for go to interiors at houses..i have a dynamic system for house and i need to go to a interior....
I make`d a command, /enter but don`t work...
I can enter only in house.When i try to enter in a business tell me : This is not a house... and at faction hq give me this message..What it`s wrong ??
Код:
command(enter, playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 5.0, 2269.3821,-75.3405,26.7724)) { SetPlayerPos(playerid, 916.6719,2380.9543,246.4695); SetPlayerInterior(playerid, 1); GameTextForPlayer(playerid, "~g~Job Center~n~~r~Type /exit to go outside", 3000, 5); LoadInterior(playerid); } if(IsPlayerInRangeOfPoint(playerid, 5.0, 1252.5388,137.0014,20.8469)) { SetPlayerPos(playerid, -2029.7589,-118.3868,1035.1719); SetPlayerInterior(playerid, 3); GameTextForPlayer(playerid, "~w~DMV~n~~r~Type /exit to go outside", 3000, 5); LoadInterior(playerid); } else if(IsPlayerInRangeOfPoint(playerid, 5.0, 627.9313,-571.6613,17.4696)) { SetPlayerPos(playerid, 246.2813,108.7695,1003.2188); SetPlayerInterior(playerid, 10); GameTextForPlayer(playerid, "~w~Red County Sheriffs Department~n~~r~Type /exit to go outside", 3000, 5); LoadInterior(playerid); } else if(IsPlayerInRangeOfPoint(playerid, 5.0, 624.0983,-600.0155,16.7198)) { if(Player[playerid][Faction] == 1) { if(IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(GetPlayerVehicleID(playerid), 1589.5502,-1646.0876,11.3940); SetVehicleZAngle(GetPlayerVehicleID(playerid), 201.7274); LoadInterior(playerid); } else { SetPlayerPos(playerid, 1589.5502,-1646.0876,11.3940); LoadInterior(playerid); } } else return SendClientMessage(playerid, WHITE, "You don't have the right to be inside of here."); } else { for(new i = 1; i < MAX_HOUSES; i++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, Houses[i][HouseExteriorX], Houses[i][HouseExteriorY], Houses[i][HouseExteriorZ])) { if(Houses[i][HouseLocked] == 0) { new string[256]; SetPlayerPos(playerid, Houses[i][HouseInteriorX], Houses[i][HouseInteriorY], Houses[i][HouseInteriorZ]); SetPlayerInterior(playerid, Houses[i][HouseInteriorID]); format(string, sizeof(string), "~w~%s~n~~r~Type /exit to go outside", Houses[i][HouseName]); GameTextForPlayer(playerid, string, 3000, 5); SetPlayerVirtualWorld(playerid, Houses[i][HouseWorld]); LoadInterior(playerid); } else { new string[256]; format(string, sizeof(string), "%s is currently locked.", Houses[i][HouseName]); SendClientMessage(playerid, WHITE, string); } } } for(new i = 1; i < MAX_BUSINESS; i++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, Business[i][BusinessExteriorX], Business[i][BusinessExteriorY], Business[i][BusinessExteriorZ])) { if(Business[i][BusinessEnterable] == 1) { if(Player[playerid][Money] >= Business[i][BusinessEnterFee]) { new string[256]; SetPlayerPos(playerid, Business[i][BusinessInteriorX], Business[i][BusinessInteriorY], Business[i][BusinessInteriorZ]); SetPlayerInterior(playerid, Business[i][BusinessInteriorID]); format(string, sizeof(string), "Welcome to %s. Owned by %s. Entrance fee: $%d.", Business[i][BusinessName], Business[i][BusinessOwner], Business[i][BusinessEnterFee]); SendClientMessage(playerid, WHITE, string); InBusiness[playerid] = i; Player[playerid][Money] -= Business[i][BusinessEnterFee]; SetPlayerVirtualWorld(playerid, Business[i][BusinessWorld]); format(string, sizeof(string), "~w~%s~n~~r~Type /exit to go outside", Business[i][BusinessName]); GameTextForPlayer(playerid, string, 3000, 5); LoadInterior(playerid); } else return SendClientMessage(playerid, GREY, "You don't have enough money to enter this business."); } else return SendClientMessage(playerid, WHITE, "This business isn't enterable."); } } } return 1; }
How can i create a simple command for teleport ? SetPlayerPos and SetPlayerInt..i need for go to interiors at houses..i have a dynamic system for house and i need to go to a interior....