Spikes in air
#1

I did ocomanda spikes and they do not appear on the road appear in the air ...

http://i.imgur.com/beo5jik.png
Код:
//========================================[CMD:SPIKESTRIPES]===================================================
CMD:spikestripes(playerid, params[])
	{
		if (!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti politist!");
		if (PlayerInfo[playerid][pSpikestrip] != 0) return SendClientMessage(playerid, COLOR_GREY, "Poti folosi doar 1 spike-strip in acelasi timp, scrie /rsp pentru a-l sterge pe cel actual.");
		if (spikestriptimer != 0) return SendClientMessage(playerid, COLOR_GREY, "Asteapta putin inainte sa mai pui un spike-strip!");
		new Float:A;
		new sendername[MAX_PLAYER_NAME], string[256];
		GetPlayerPos(playerid, X, Y, Z);
		GetPlayerFacingAngle(playerid, A);
		PlayerInfo[playerid][pSpikestrip] = CreateDynamicObject(2899, X, Y, Z, 0.0, 0.0, A+180);
		SetPlayerPos(playerid, X, Y, Z+4);
		GameTextForPlayer(playerid, "~w~SpikeStrip ~r~Pus", 5000, 5);
		SendClientMessage(playerid, COLOR_GREEN, "Ai pus un spike-strip cu succes, scrie /rsp sau /removespikestrip pentru a-l sterge.");
		spikestriptimer = 1;
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "HQ: Un spike-strip a fost depus de catre %s, si a fost marcat pe harta cu un checkpoint.", sendername);
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
				{
					SetPlayerCheckpoint(playerid, X, Y, Z-10, 1.0);
					SendClientMessage(i, TEAM_BLUE_COLOR, string);
					if (PlayerInfo[i][pRank] >= 5 && PlayerInfo[i][pMember] || PlayerInfo[i][pLeader] == 1)
					{
						SendClientMessage(i, COLOR_YELLOW, "Poti sterge toate spike-strip tastand /rspall");
					}
				}
			}
		}
		SetTimer("ResetSpikestripTimer", 60000, false);
		return 1;
	}
Reply
#2

This
Код:
    PlayerInfo[playerid][pSpikestrip] = CreateDynamicObject(2899, X, Y, Z, 0.0, 0.0, A+180);
To

Код:
    PlayerInfo[playerid][pSpikestrip] = CreateDynamicObject(2899, X, Y, Z-5, 0.0, 0.0, A+180);
Reply
#3

5 seems to be way too high, try decreasing the values slightly(change the Z).
Reply
#4

Wrong
Reply
#5

http://i.imgur.com/h7kon3J.jpg
PlayerInfo[playerid][pSpikestrip] = CreateDynamicObject(2899, X, Y, Z-1, 0.0, 0.0, A+180);


but when they do besides pass surf car wheels ...
Reply
#6

Код:
    PlayerInfo[playerid][pSpikestrip] = CreateDynamicObject(2899, X, Y, Z-0.5, 0.0, 0.0, A+180);
Reply
#7

That only makes it worse. You should try using a value such as -0.2 minus the Z such as:
pawn Код:
PlayerInfo[playerid][pSpikestrip] = CreateDynamicObject(2899, X, Y, Z-0.25, 0.0, A+180);
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)