[POMOC] /blokada nemoze dovrsiti

Započeo Dusan101, Septembar 01, 2011, 21:26:13 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: //
Detaljan opis problema: Kada hocu da dovrsim pawno i stisnem F5 onda mi pawno prestane raditi zasto??
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): //


#include <a_samp>

#define FILTERSCRIPT

forward CommandLog(string[]);
public CommandLog(string[])
}

if(strcmp(cmd, "/block", true) == 0 || strcmp(cmd, "/blokada", true) == 0)


{
    if(IsPlayerConnected(playerid) && IsACop(playerid) || IsPlayerAdmin(playerid))
      {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTI: /blokada [Broj blokade]");
SendClientMessage(playerid, SVETLOPLAVA, "Available Roadblocks:");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: Mala blokada | 2: Srednja blokada |");
SendClientMessage(playerid, COLOR_GRAD1, "| 3: Velika blodaka | 4: Cone | 5: Detour Sign |");
SendClientMessage(playerid, COLOR_GRAD1, "| 6: Will Be Sign | 7: Line Closed 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);
        KreirajBlokadu(1459,plocx,plocy,plocz,ploca);
        format(string,sizeof(string),"[HQ]: Casnik %s je postavio blokadu(1) na ovoj poziciji, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Blokada ~b~Postavljena!",3000,1);
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);
        KreirajBlokadu(978,plocx,plocy,plocz+0.6,ploca);
        format(string,sizeof(string),"[HQ]: Casnik %s je postavio blokadu(2) na ovoj poziciji, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Blokada ~b~Postavljena!",3000,1);
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);
        KreirajBlokadu(981,plocx,plocy,plocz+0.9,ploca+180);
        format(string,sizeof(string),"[HQ]: Casnik %s je postavio blokadu(3) na ovoj poziciji, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Blokada ~g~Postavljena!",3000,1);
        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);
        KreirajBlokadu(1238,plocx,plocy,plocz+0.2,ploca);
        format(string,sizeof(string),"[HQ]: Casnik %s je postavio Traffic Cone(1) na ovoj poziciji, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Cone ~g~Postavljena!",3000,1);
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);
        KreirajBlokadu(1425,plocx,plocy,plocz+0.6,ploca);
        format(string,sizeof(string),"[HQ]: Casnik %s je postavio Detour Sign(4) na ovoj poziciji, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Sign ~g~Postavljena!",3000,1);
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);
        KreirajBlokadu(3265,plocx,plocy,plocz-0.5,ploca);
        format(string,sizeof(string),"[HQ]: Casnik %s je postavio Will Be Sign(5) na ovoj poziciji, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Sign ~g~Postavljena!",3000,1);
return 1;
}
else if (rb == 7)
{
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);
        KreirajBlokadu(3091,plocx,plocy,plocz+0.5,ploca+180);
        format(string,sizeof(string),"[HQ]: Casnik %s je postavio Line Closed Sign(6) na ovoj poziciji, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Sign ~g~Postavljena!",3000,1);
return 1;
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /KreirajBlokadu %d",d,m,y,h,mi,s,sendername, rb);
CommandLog(string);
}
    return 1;
}
//-------------------------------------------------------------------------------

/*------------------------------------------------------------------------------*/
if (strcmp(cmd,"/ukloniblock",true) == 0 || strcmp(cmd, "/skloniblokadu", true) == 0)
{
    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 2)
      {
        UkloniBlokadu(playerid);
        format(string,sizeof(string),"[HQ]: Casnik %s je maknuo blokadu, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~w~Blokada ~r~Maknuta!",3000,1);
        new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /removeroadblock",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
    return 1;
}
/*------------------------------------------------------------------------------*/
if (strcmp(cmd,"sklonisveblokade",true) == 0 || strcmp(cmd, "/ssb", true) == 0)
{
    if(IsPlayerConnected(playerid) && IsACop(playerid)  || PlayerInfo[playerid][pAdmin] >= 2)
      {
if(PlayerInfo[playerid][pRank] >= 5 || PlayerInfo[playerid][pAdmin] >= 2) // This being the default Chief rank in LA-RP change if neccesary.
{
        UkloniSveBlokade(playerid);
        format(string,sizeof(string),"[HQ]: Casnik %s je maknuo sve blokade u podrucju, prijam.",sendername);
        SendRadioMessage(1,SVETLOPLAVA,string);
        GameTextForPlayer(playerid,"~b~All ~w~Blokade~r~Maknute!",3000,1);
        new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /removeroadblockall",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
}
    return 1;
}


makelele

Cekaj kolko znam broj zagrada ti nije jednak,i zato ti se to javljamo...Kolko sam vidio imas 29 zagrada,znaci neparan broj pogledaj gde ti fali to mi se neda stvarno...

forward CommandLog(string[]);
public CommandLog(string[])
}

evo xD ovo gore zamjeni ovim dole

forward CommandLog(string[]);
public CommandLog(string[])
{
    return 1;
}

a mozes ga i obrisati,nevidim mu nikakvu funkciju xD
Poslednja Izmena: Septembar 02, 2011, 07:29:07 PRE PODNE od almir101

te komande stavi pod onplayercommandtext
Vratio sam se ponovo ocekjute novi server...