[pomoc]Blokada

Započeo MT3 bolinx, Februar 20, 2012, 09:38:36 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: CL edit
Detaljan opis problema: Znaci napravio sam u dialogu za PD stvaranje blokada, sve je dobro, al blokad mi stoji u sraku(ne puno), al dovoljno da se vidi -.-"
Deo skripte:
Kod: [Odaberi]
PlayerInfo[playerid][pRoadblock] = CreateDynamicObject(981, X, Y, Z, 0.0, 0.0, A+180);
Neke slike/video za lakse dobivanje pomoci(neobavezno):/


EDIT: zasto mi je lockana stara tema? -.-"

lol pojasni malo. daj neku sliku.
Ako sam dobro razumeo, kada policajac stavi blokadu ona bude u zraku ili...
Pokusaj ovako onda:

new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
PlayerInfo[playerid][pRoadblock] = CreateObject(981, X, Y, Z, 0.0, 0.0, A+180);
SetPlayerPos(playerid, X, Y, Z+4);

tako mi je vec u skripti -.-"
dovoljno sam objasnio problem u prvoj recenici, znaci kada postavim neku blokadu ona mi onako malo strsu u zraku, znaci nije skroz na zemlji kako bi trebala bit

Izvoli celu komandu iz moje skripte :

if(strcmp(cmdtext, "/roadblock", true)==0 || strcmp(cmdtext, "/rb", true)==0)
{
if (PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1) return SendClientMessage(playerid, COLOR_GREY, "Vi niste policajac!");
if (PlayerInfo[playerid][pRoadblock] != 0) return SendClientMessage(playerid, COLOR_GREY, "You can only deploy 1 roadblock at a time, type /rrb to remove your existing one.");
if (roadblocktimer != 0) return SendClientMessage(playerid, COLOR_GREY, "Please wait before trying to spawn another roadblock!");
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
PlayerInfo[playerid][pRoadblock] = CreateObject(981, X, Y, Z, 0.0, 0.0, A+180);
SetPlayerPos(playerid, X, Y, Z+4);
GameTextForPlayer(playerid, "~w~Blokada Puta ~r~Postavljena", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, "Blokada Puta je uspesno postavljena, ukucajte /rrb ili /roadunblock da je obrisete.");
roadblocktimer = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "HQ: Blokada Puta je postavljena od strane %s, oznacena je na mapi crvenim markerom.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1) // edituj ovo i za druge org tipa FBI ili Vojska. Ne znam IDove kod tebe pa sam ostavio samo za PD jer verujem da je to org 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, "Mozete skinuti sve blokade preko komande: /rrball");// podesi kako je kod tebe u modu
}
}
}
}
SetTimer("ResetRoadblockTimer", 60000, false); // ovo podesi kako ti zelis
return 1;
}


Poz :)

nije mi bit da mi das novu komandu, nego da mi kazes gdje je problem da znam za ubuduce ;)

A to što ti stoji u zraku možda si podigao ne znam ni ja xD

Et' ti menjaj text i radi šta hoćeš :D

//Roadblock by Thomy aka Seyziich
if(strcmp(cmd, "/roadblock", true) == 0)
{
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /roadblock [Roadblock ID]");
SendClientMessage(playerid, COLOR_WHITE, "× 1) Mali Roadblock");
SendClientMessage(playerid, COLOR_WHITE, "× 2) Srednji Roadblock");
SendClientMessage(playerid, COLOR_WHITE, "× 3) Velik Roadblock");
SendClientMessage(playerid, COLOR_WHITE, "× 4) Cone");
SendClientMessage(playerid, COLOR_WHITE, "× 5) Sign");
return 1;
}
            new rb = strval(tmp);
            if (rb == 1)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateRoadblock(1459,plocx,plocy,plocz,ploca);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Uspjesno ste postavili roadblock.");
return 1;
}
else if (rb == 2)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Uspjesno ste postavili roadblock.");
return 1;
}
else if (rb == 3)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Uspjesno ste postavili roadblock.");
        SetPlayerPos(playerid, plocx, plocy+1.3, plocz);
return 1;
}
else if (rb == 4)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Uspjesno ste postavili cone.");
return 1;
}
else if (rb == 4)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Uspjesno ste postavili cone.");
return 1;
}
else if (rb == 5)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Uspjesno ste postavili sign.");
return 1;
}
else if (rb == 6)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid, plocx, plocy, plocz);
        GetPlayerFacingAngle(playerid,ploca);
        CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);
        SendClientMessage(playerid, COLOR_WHITE, "INFO: Uspjesno ste postavili sign.");
return 1;
}
}
    return 1;
}
Poslednja Izmena: Februar 20, 2012, 20:29:04 POSLE PODNE od Frank.

Citat: [BNbolinx]
nije mi bit da mi das novu komandu, nego da mi kazes gdje je problem da znam za ubuduce ;)
Poslednja Izmena: Februar 20, 2012, 22:19:18 POSLE PODNE od [BN] bolinx

smani visinu, odnosno npr

ovo je tvoje:

CreateDynamicObject(981, X, Y, Z, 0.0, 0.0, A+180);


ti uradis ovako

CreateDynamicObject(981, X, Y, Z-2, 0.0, 0.0, A+180);

naravno sa -2 ti mozes da podesavas da ide jos dole, ili ako je previse da povecas na -1 ili -0.5 itd...

[quote author=
Maki187 link=topic=38813.msg290296#msg290296 date=1329836641]
smani visinu, odnosno npr

ovo je tvoje:

CreateDynamicObject(981, X, Y, Z, 0.0, 0.0, A+180);


ti uradis ovako

CreateDynamicObject(981, X, Y, Z-2, 0.0, 0.0, A+180);

naravno sa -2 ti mozes da podesavas da ide jos dole, ili ako je previse da povecas na -1 ili -0.5 itd...
[/quote]

e to Maki :D, hvala  ;)