pawn Код:
COMMAND:rob(playerid,params[])
{
if(gTeam[playerid] == TEAM_ROBBERS)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,377.0883,-115.8647,1001.4922) || IsPlayerInRangeOfPoint(playerid,1.0,-2235.9595,128.4391,1035.4141) ||
IsPlayerInRangeOfPoint(playerid,1.0,379.6420,-8.8524,1001.8516) || IsPlayerInRangeOfPoint(playerid,1.0,378.3380,-65.0391,1001.5078) ||
IsPlayerInRangeOfPoint(playerid,1.0,161.4013,-79.2683,1001.8047) || IsPlayerInRangeOfPoint(playerid,1.0,-202.0584,-5.0931,1002.2734) ||
IsPlayerInRangeOfPoint(playerid,1.0,418.5518,-75.7314,1001.8047) || IsPlayerInRangeOfPoint(playerid,1.0,502.6806,-11.5208,1000.6797) ||
IsPlayerInRangeOfPoint(playerid,1.0,204.0275,-40.4131,1001.8047) || IsPlayerInRangeOfPoint(playerid,1.0,508.1718,-84.3275,998.9609) ||
IsPlayerInRangeOfPoint(playerid,1.0,207.9089,-97.6883,1005.2578) || IsPlayerInRangeOfPoint(playerid,1.0,202.6309,-12.2767,1001.2109) ||
IsPlayerInRangeOfPoint(playerid,1.0,380.7967,-8.8136,1001.8516))
{
new Float:x,Float:y,Float:z,Float:a,Float:X,Float:Y;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
X = x + (20 * floatsin(-a,degrees));
Y = y + (20 * floatcos(-a,degrees));
CreateObject(1252,X,Y,z + 20,0,0,0,30.0);
}
if(GetPlayerInterior(playerid) == 0) return SendClientMessage(playerid,COLOR_FORESTGREEN,"This command can be used only on a shop");
}
if(gTeam[playerid] == TEAM_COPS || gTeam[playerid] == TEAM_MEDICS || gTeam[playerid] == TEAM_FIREFIGHTERS) return SendClientMessage(playerid,COLOR_RED,"This command is only for robbers");
return true;
}
I want to bet that the object is actually created, but you're just too far away to see it. Z+20 is too high. For comparison: The height of the player is 1.9.
thx vince it worked what u told me and also thanks swiftz but vince was right