Objects don't spawn.
#1

Код:
	if(strcmp(cmd, "/deployroadblock", true) == 0)
	{
	    if(!IsACop(playerid) || PlayerInfo[playerid][pMember] == 5)
	    {
	        return SendClientMessage(playerid,COLOR_GREY,"   You are not a Cop / FBI / SASP / NG !");
	    }
	    if(PlayerInfo[playerid][pRank] < 9)
		{
		   return SendClientMessage(playerid,COLOR_GREY,"   Your rank is too low to be removing road blocks !");
		}
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        return SendClientMessage(playerid,COLOR_GREY,"   You cannot place a road block while inside a vehicle !");
	    }
	    new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
	    GetPlayerPos(playerid,plocx,plocy,plocz);
	    GetPlayerFacingAngle(playerid,ploca);
	    new location[MAX_ZONE_NAME];
		GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
		new Float:x, Float:y, Float:z, Float:angle;
	    GetPlayerFacingAngle(playerid, angle);
	    GetPlayerPos(playerid, x, y, z);
		CreateRoadBlock(x, y, z, angle);
	    format(string, sizeof(string), "HQ: %s %s has placed a roadblock at %s", GetPlayerRank(playerid),PlayerName(playerid), location);
		SendRadioMessage(1, TEAM_BLUE_COLOR, string);
		SendRadioMessage(2, TEAM_BLUE_COLOR, string);
		SendRadioMessage(3, TEAM_BLUE_COLOR, string);
		SendRadioMessage(5, TEAM_BLUE_COLOR, string);
        /*GetPlayerFacingAngle(playerid,ploca);
        CreateStrip(plocx,plocy,plocz,ploca);*/
	    return 1;
	}
And:

Код:
stock CreateRoadBlock(Float:x,Float:y,Float:z,Float:Angle)
{
    for(new i = 0; i < sizeof(BlockInfo); i++)
  	{
  	    if(BlockInfo[i][sCreated] == 0)
  	    {
            BlockInfo[i][sCreated]=1;
            BlockInfo[i][sX]=x;
            BlockInfo[i][sY]=y;
            BlockInfo[i][sZ]=z-0.7;
            BlockInfo[i][sObject] = CreateObject(973, x, y, z-0.9, 0, 0, Angle-90);
	        return 1;
  	    }
  	}
  	return 0;
}
It says that it's getting spawned, but it's not. When I deploy a spikestrip on the same way, the object doesn't appear but if you drive over it, tyres are popped. How do I solve this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)