Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Left4Dead poslato Februar 28, 2011, 17:53:01 POSLE PODNE

Naslov: [POMOC] Zagrada
Poruka od: Left4Dead poslato Februar 28, 2011, 17:53:01 POSLE PODNE
Skripta koju koristim: Neki Weber 2.8 prevedeni sa ovoga foruma
Detaljan opis problema: Kaze da mi negde fali zagrada, trazio sam ali nisam uspeo naci, molim vas pomozite mi!
Dio skripte:


   if(dialogid == 102)
    {
        if(response)
        {
            if(listitem == 0)   //LEVEL 1
            {
            if(IsAtDealership(playerid))
            {
                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])
                {
                    new ownvehkey;
                    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { ownvehkey = PlayerInfo[playerid][pPcarkey]; }
                        else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; }
                    else { return 1; }
                    if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0)
                    {
                        new carsellprice = GetVehiclePrice(ownvehkey) / 4 * 3;
                        CarInfo[ownvehkey][cOwned] = 0;
                        strmid(CarInfo[ownvehkey][cOwner], "Dealership", 0, strlen("Dealership"), 999);
                        SafeGivePlayerMoney(playerid,carsellprice);
                        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                        format(string, sizeof(string), "~w~Prodao si svoj auto za: ~n~~g~$%d", carsellprice);
                        GameTextForPlayer(playerid, string, 10000, 3);
                        CarInfo[ownvehkey][cLocationx] = 0;
                        CarInfo[ownvehkey][cLocationy] = 0;
                        CarInfo[ownvehkey][cLocationz] = 10000;
                        CarInfo[ownvehkey][cAngle] = 0.0;
                        CarInfo[ownvehkey][cModel] = 400;
                        CarInfo[ownvehkey][cVirWorld] = 9999;
                        if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { PlayerInfo[playerid][pPcarkey] = 999; }
                        if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = 999; }
                        SafeRemovePlayerFromVehicle(playerid);
DestroyVehicle(ownvehkey);
CreateVehicle(CarInfo[ownvehkey][cModel], CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz],0,1,1,3000);
                        TogglePlayerControllable(playerid, 1);
                        ClearVehicleComponents(ownvehkey);
                        ChangeVehiclePaintjob(ownvehkey, 9999);
SetVehicleVirtualWorld(ownvehkey, 9999);
                        OnPropUpdate(4);
                        OnPlayerUpdateEx(playerid);
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, -1, ""CRVENA"[iBot]"SIVA": Niste u vozilu! ");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, ""CRVENA"[iBot]"SIVA": Niste kod AutoSalona");
                return 1;
            }
        }
        }
}
else  if(listitem == 1)   //LEVEL 1
            {
    {
            new Float:x,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
    if(PlayerInfo[playerid][pPcarkey] == 999  && PlayerInfo[playerid][pPcarkey2] == 999)
{
SendClientMessage(playerid, -1, ""CRVENA"[iBot]"SIVA": Neposjedujete vozilo!");
return 1;
}
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ Parkirao si vozilo na ovu lokaciju. ~n~");
GameTextForPlayer(playerid, "Parkirao si vozilo na ovu lokaciju. Od sad ce se spawnati ovdje.", 10000, 3);
OnPropUpdate(4);
OnPlayerUpdateEx(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
                        if(CarInfo[carid][cPaintjob] != 999)
{
ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]);
}
SetVehicleVirtualWorld(carid, CarInfo[carid][cVirWorld]);
SetVehicleModifications(carid);
TogglePlayerControllable(playerid, 1);
PutPlayerInVehicle(playerid, carid, 0);
return 1;
    }
}
        }
        }
else  if(listitem == 2)   //LEVEL 1
            {
    {
                new keycar = PlayerInfo[playerid][pPcarkey];
                if(keycar != 999)
                {
                    new locked[128];
                    locked = strtok(cmdtext, idx);
                    if(CarInfo[keycar][cLock] == 1)
                    {
                    for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,0);
}
}
format(string, sizeof(string), "~w~Vozilo~n~~g~Odkljucano");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 0;
OnPropUpdate(4);
return 1;
}
else if(CarInfo[keycar][cLock] == 0)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,1);
}
}
format(string, sizeof(string), "~w~Vozilo~n~~r~Zakljucano");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 1;
OnPropUpdate(4);
return 1;
}
                }
                else
                {
                    SendClientMessage(playerid, -1, ""CRVENA"[iBot]"SIVA":  Nemate vozilo na slotu br. 1!");
                    return 1;
                }
        }
}
}
else  if(listitem == 3)   //LEVEL 1
            {
    {
                new keycar = PlayerInfo[playerid][pPcarkey2];
                if(keycar != 999)
                {
                    new locked[128];
                    locked = strtok(cmdtext, idx);
                    if(CarInfo[keycar][cLock] == 1)
                    {
                    for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,0);
}
}
format(string, sizeof(string), "~w~Vozilo~n~~g~Odkljucano");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 0;
OnPropUpdate(4);
return 1;
}
else if(CarInfo[keycar][cLock] == 0)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,1);
}
}
format(string, sizeof(string), "~w~Vozilo~n~~r~Zakljucano");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo[keycar][cLock] = 1;
OnPropUpdate(4);
return 1;
}
                }
                else
                {
                    SendClientMessage(playerid, ""CRVENA"[iBot]"SIVA":  Nemate vozilo na slotu br. 2!");
                    return 1;
                }
            }
            }
}
else  if(listitem == 4)   //LEVEL 1
            {
            if(PlayerInfo[playerid][pPcarkey] == 999)
        {
            SendClientMessage(playerid, -1, ""CRVENA"[iBot]"SIVA": Neposjedujete vozilo!");
            return 1;
        }
        if(GetPlayerMoney(playerid) < 5000)
        {
            SendClientMessage(playerid, -1, ""CRVENA"[iBot]"SIVA": Nemate dovoljno novca");
            return 1;
        }
new color1;
color1 = strval(tmp);
if(color1 < 0 && color1 > 3)
{
    SendClientMessage(playerid, -1, ""CRVENA"[iBot]"SIVA": Krivi ID Boje!");
    return 1;
}
new vehid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; }
else { return 1; }
        if(IsPlayerInVehicle(playerid, vehid))
        {
          CarInfo[vehid][cPaintjob] = color1;
                SafeGivePlayerMoney(playerid, -5000);
                GameTextForPlayer(playerid, "~w~Racun za bojenje vozila~n~~r~-$5000", 5000, 1);
                ChangeVehiclePaintjob(vehid, color1);
                OnPropUpdate(4);
OnPlayerUpdateEx(playerid);
return 1;
    }
        else
        {
            SendClientMessage(playerid, -1, ""CRVENA"[iBot]"SIVA": Nisi u vozilu !");
            return 1;
        }
        }
}
return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno):
Naslov: Odg: [POMOC] Zagrada
Poruka od: makelele poslato Februar 28, 2011, 18:00:12 POSLE PODNE
vise imas ovih zatvorenih samo ti to mogu pomoci nisam mogao ni ja da vidim gde ti fali
Naslov: Odg: [POMOC] Zagrada
Poruka od: mafica .pwn poslato Februar 28, 2011, 18:08:59 POSLE PODNE
Pomuci se malo sam prebroji otvorene i zatvorene vidjet ces da otvorenih ima vise ;)
Naslov: Odg: [POMOC] Zagrada
Poruka od: Left4Dead poslato Februar 28, 2011, 18:18:40 POSLE PODNE
A Prebrojao sam i uvijek ima isto :S Osim ako ja ne grijesim, a sigurno grijesim -.-
Ako neko moze bio bih mu zahvalan :(