[POMOC] Kucno vozilo i kuca..

Započeo [CH]Ivan_Lukic, Maj 03, 2011, 21:12:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GTARP
Detaljan opis problema:
1. Problem: Kucni auti - dodavao sam kune aute ali nece da ih da ih promjeni kad kucam /carupgrade poslije gmx-a bude opt kombi.....
2. Problem: Kuce - Sve su mi kuce na level 0 i kad promjenim na npr 10 ugasim server dodem ponovo opt isto...
Dio skripte:
1. Problem Kucni auti(ovo sam sve dodavao)
new Float:HouseCarSpawns[5][4] = {
{1339.9069,-1100.7212,24.0150,350.6126},//Kuca 1
{1346.6345,-1068.7640,25.8850,346.6492},//Kuca 2
{1281.5995,-1058.4565,29.5492,94.6091},//Kuca 3
{1289.3605,-1080.7212,25.9558,88.0493},//Kuca 4
{1236.0256,-1085.7996,29.2567,270.9501}//Kuca 5
};
ovo sam dodo ali samo za 5 kuca samo da vidim jel oce radit...

ovo sam ubacio pod ongamemodeinit
  for(new h = 0; h < sizeof(HouseInfo); h++)
{
AddStaticVehicleEx(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 60000);
gCarLock[h+1] = 1;
}//34


i ove komande:
//-------------------------------[UPGRADE]--------------------------------------------------------------------------
if (strcmp(cmd, "/carcolor", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
new house = PlayerInfo[playerid][pPhousekey];
GetPlayerName(playerid, playername, sizeof(playername));
if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD3,"($5000) KORISTITE: /carcolor [boja 1 - 2] [broj boje]");
return 1;
}
new colornum = strval(tmp);
if(colornum > 2 || colornum < 1)
{
SendClientMessage(playerid, COLOR_GRAD3,"Boje su 1 ili 2");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD3,"($5000) KORISTITE: /carcolor [boja 1 - 2] [broj boje]");
}
new color = strval(tmp);
if(color > 126)
{
SendClientMessage(playerid, COLOR_GRAD3,"Maksimalna je 126");
return 1;
}
if (GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GRAD3,"Nemate dovoljno novaca ($5000)");
}
if(colornum == 1)
{
HouseInfo[house][hVcol1] = color;
format(string, sizeof(string), "Boja auta 1 namjestena na %d -$5000",color);
SendClientMessage(playerid, COLOR_GRAD3,string);
}
else
{
HouseInfo[house][hVcol2] = color;
format(string, sizeof(string), "Boja auta 2 namjestena na %d -$5000",color);
SendClientMessage(playerid, COLOR_GRAD3,string);
}
SendClientMessage(playerid, COLOR_GRAD6, "Vas novi paintjob ce biti izvrsen za 24 sata.");
GivePlayerMoney(playerid,-5000);
SBizzInfo[5][sbTill] += 5000;
ExtortionSBiz(5, 5000);
PlayerPlaySound(giveplayerid, 1134, 0.0, 0.0, 0.0);
OnPropUpdate();
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste vlasnik kuce");
return 1;
}
}
return 1;
}
if (strcmp(cmd, "/carupgrade", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
new house = PlayerInfo[playerid][pPhousekey];
GetPlayerName(playerid, playername, sizeof(playername));
if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
new gunid[16];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "KORISTITE: /carupgrade [autoime]");
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessage(playerid, COLOR_WHITE,"*** AUTO UPGRADES Cijena $100000 ***");
SendClientMessage(playerid, COLOR_GRAD2,string);
if(PlayerInfo[playerid][pLevel] >= 3)
{
SendClientMessage(playerid, COLOR_GRAD3, "Auti: blistacompact clover elegant emperor glendale greenwood");
SendClientMessage(playerid, COLOR_GRAD3, "Auti: huntley jester landstalker merit nebula sabre stratum");
SendClientMessage(playerid, COLOR_GRAD3, "Auti: sunrise tahoma uranus");
SendClientMessage(playerid, COLOR_GRAD3, "Donacijski Auti: stretch elegy phoenix hotknife bandito sultan");
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
return 1;
}
strmid(gunid, tmp, 0, strlen(cmdtext), 255);
if (GetPlayerMoney(playerid) > 100000)
{
if(strcmp(gunid, "stretch", true, strlen(gunid)) == 0)
{
   if(PlayerInfo[playerid][pDonateRank] < 1)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Nemate Premium Account !");
       return 1;
   }
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Stretch");
HouseInfo[house][hVec] = 409;
}
else if(strcmp(gunid, "hotknife", true, strlen(gunid)) == 0)
{
   if(PlayerInfo[playerid][pDonateRank] < 1)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Nemate Premium Account !");
       return 1;
   }
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Hotknife");
HouseInfo[house][hVec] = 434;
}
else if(strcmp(gunid, "bandito", true, strlen(gunid)) == 0)
{
   if(PlayerInfo[playerid][pDonateRank] < 1)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Nemate Premium Account !");
       return 1;
   }
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Bandito");
HouseInfo[house][hVec] = 568;
}
else if(strcmp(gunid, "sultan", true, strlen(gunid)) == 0)
{
   if(PlayerInfo[playerid][pDonateRank] < 1)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Nemate Premium Account !");
       return 1;
   }
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Sultan");
HouseInfo[house][hVec] = 560;
}
else if(strcmp(gunid, "elegy", true, strlen(gunid)) == 0)
{
   if(PlayerInfo[playerid][pDonateRank] < 1)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Nemate Premium Account !");
       return 1;
   }
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Elegy");
HouseInfo[house][hVec] = 562;
}
else if(strcmp(gunid, "phoenix", true, strlen(gunid)) == 0)
{
   if(PlayerInfo[playerid][pDonateRank] < 1)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Nemate Premium Account !");
       return 1;
   }
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Phoenix");
HouseInfo[house][hVec] = 603;
}
else if(strcmp(gunid, "blistacompact", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Blista Compact");
HouseInfo[house][hVec] = 496;
}
else if(strcmp(gunid, "clover", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Clover");
HouseInfo[house][hVec] = 542;
}
else if(strcmp(gunid, "elegant", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Elegant");
HouseInfo[house][hVec] = 507;
}
else if(strcmp(gunid, "emperor", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Emperor");
HouseInfo[house][hVec] = 585;
}
else if(strcmp(gunid, "glendale", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Glendale");
HouseInfo[house][hVec] = 466;
}
else if(strcmp(gunid, "greenwood", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Greenwood");
HouseInfo[house][hVec] = 492;
}
else if(strcmp(gunid, "huntley", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Huntley");
HouseInfo[house][hVec] = 579;
}
else if(strcmp(gunid, "jester", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Jester");
HouseInfo[house][hVec] = 559;
}
else if(strcmp(gunid, "landstalker", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Landstalker");
HouseInfo[house][hVec] = 400;
}
else if(strcmp(gunid, "merit", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Merit");
HouseInfo[house][hVec] = 551;
}
else if(strcmp(gunid, "nebula", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Nebula");
HouseInfo[house][hVec] = 516;
}
else if(strcmp(gunid, "sabre", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Sabre");
HouseInfo[house][hVec] = 475;
}
else if(strcmp(gunid, "stratum", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Stratum");
HouseInfo[house][hVec] = 561;
}
else if(strcmp(gunid, "sunrise", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Sunrise");
HouseInfo[house][hVec] = 550;
}
else if(strcmp(gunid, "tahoma", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Tahoma");
HouseInfo[house][hVec] = 566;
}
else if(strcmp(gunid, "uranus", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Vas kucni auto je sada Uranus");
HouseInfo[house][hVec] = 558;
}
else
{
SendClientMessage(playerid, COLOR_GRAD6, "   Nepoznati auto ili je Donatorski rank prenizak.");
return 1;
}
SendClientMessage(playerid, COLOR_GRAD6, "Vas novi auto ce stici za 24 sata -$100000");
OnPropUpdate();
GivePlayerMoney(playerid,-100000);
SBizzInfo[5][sbTill] += 100000;
ExtortionSBiz(5, 100000);
SBizzInfo[5][sbProducts]--;
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemozete si to priustiti ($100000)");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste vlasnik kuce");
return 1;
}
}
return 1;
}

Dodo sam jos nesto sitno npr ovo:

public CarTow(carid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
{
gLastDriver[carid] = 255;
return 0;
}
}
}
SetVehiclePos(carid,HouseCarSpawns[carid-1][0], HouseCarSpawns[carid-1][1], HouseCarSpawns[carid-1][2]);
SetVehicleZAngle(carid, HouseCarSpawns[carid-1][3]);
return 1;
}


2. Problem Kuce:
Ako budete sta trebali recite..

Neke slike/video za lakse dobivanje pomoci(neobavezno): /

HVala!!!!

ovo za kucne aute, sto nebi trebao id auta ispred koordinata? Ispravite me ako je ne tocno!
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

ja mislim da netreba jer sam tako vidio da je i u gf-u