25.08.2015, 02:05
I did ocomanda spikes and they do not appear on the road appear in the air ...
http://i.imgur.com/beo5jik.png
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;
}

