CMD:hcspawnpos(playerid, params[]) {
if(getPlayerBusinessID(playerid) >= 1) {
new
businessID = getPlayerBusinessID(playerid);
if(businessVariables[businessID][bType] == 16) {
if(IsPlayerInRangeOfPoint(playerid, 30.0, businessVariables[businessID][bExteriorPos][0], businessVariables[businessID][bExteriorPos][1], businessVariables[businessID][bExteriorPos][2])) {
GetPlayerPos(playerid, businessVariables[businessID][bMiscPos][0], businessVariables[businessID][bMiscPos][1], businessVariables[businessID][bMiscPos][2]);
SendClientMessage(playerid, COLOR_WHITE, "You have successfully altered the spawn position of your vehicle dealership business.");
}
else SendClientMessage(playerid, COLOR_GREY, "You must be within thirty metres of the exterior of your business.");
}
else SendClientMessage(playerid, COLOR_GREY, "You don't own a helicopter dealership.");
}
return 1;
}
CMD:bspawnpos(playerid, params[]) {
if(getPlayerBusinessID(playerid) >= 1) {
new
businessID = getPlayerBusinessID(playerid);
if(businessVariables[businessID][bType] == 5) {
if(IsPlayerInRangeOfPoint(playerid, 30.0, businessVariables[businessID][bExteriorPos][0], businessVariables[businessID][bExteriorPos][1], businessVariables[businessID][bExteriorPos][2])) {
GetPlayerPos(playerid, businessVariables[businessID][bMiscPos][0], businessVariables[businessID][bMiscPos][1], businessVariables[businessID][bMiscPos][2]);
SendClientMessage(playerid, COLOR_WHITE, "You have successfully altered the spawn position of your vehicle dealership business.");
}
else SendClientMessage(playerid, COLOR_GREY, "You must be within thirty metres of the exterior of your business.");
}
else SendClientMessage(playerid, COLOR_GREY, "You don't own a vehicle dealership.");
}
return 1;
}
CMD:hcspawnpos(playerid, params[]) {
if(getPlayerBusinessID(playerid) >= 1) {
new
businessID = getPlayerBusinessID(playerid);
GetPlayerPos(playerid, businessVariables[businessID][bMiscPos][0], businessVariables[businessID][bMiscPos][1], businessVariables[businessID][bMiscPos][2]);
if(businessVariables[businessID][bType] == 16) {
if(IsPlayerInRangeOfPoint(playerid, 30.0, businessVariables[businessID][bExteriorPos][0], businessVariables[businessID][bExteriorPos][1], businessVariables[businessID][bExteriorPos][2])) {
SendClientMessage(playerid, COLOR_WHITE, "You have successfully altered the spawn position of your vehicle dealership business.");
}
else SendClientMessage(playerid, COLOR_GREY, "You must be within thirty metres of the exterior of your business.");
}
else SendClientMessage(playerid, COLOR_GREY, "You don't own a helicopter dealership.");
}
return 1;
}
You should get the position first then put that Range
EDIT: PHP код:
|
CMD:bspawnpos(playerid, params[]) { if(getPlayerBusinessID(playerid) >= 1) { new businessID = getPlayerBusinessID(playerid); if(businessVariables[businessID][bType] == 5) { if(IsPlayerInRangeOfPoint(playerid, 30.0, businessVariables[businessID][bExteriorPos][0], businessVariables[businessID][bExteriorPos][1], businessVariables[businessID][bExteriorPos][2])) { GetPlayerPos(playerid, businessVariables[businessID][bMiscPos][0], businessVariables[businessID][bMiscPos][1], businessVariables[businessID][bMiscPos][2]); SendClientMessage(playerid, COLOR_WHITE, "You have successfully altered the spawn position of your vehicle dealership business."); } else SendClientMessage(playerid, COLOR_GREY, "You must be within thirty metres of the exterior of your business."); } else SendClientMessage(playerid, COLOR_GREY, "You don't own a vehicle dealership."); } return 1; }