[Pomoc] /hu

Započeo [GU:RP] Ivica, Januar 31, 2013, 19:57:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:cyber
Detaljan opis problema:radio sam komandu /hu, odnosno house upgrade i sada radi mi pod jedan to je heal znaci idem /hu 1, ali kad idem pod dva to je armour nista se ne desava idem /hu 2 i nista evo cmd
CMD:hu(playerid, params[])
{
    if(IsPlayerConnected(playerid))
{
new house = PlayerInfo[playerid][pPhousekey],playername[MAX_PLAYER_NAME],item;
GetPlayerName(playerid, playername, sizeof(playername));
if(house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
  if(sscanf(params, "i", item))
      {
SendClientMessage(playerid, BELA, "Koristite: /hu [item number]");
SendClientMessage(playerid, COLOR_GRAD1, "|________ House Upgrade ________|");
SendClientMessage(playerid, COLOR_GRAD2, "| 1: Health Upgrade $1000");
SendClientMessage(playerid, COLOR_GRAD3, "| 2: Armour Upgrade $2000");
return 1;
}
else if(item == 1)
{
if(PlayerInfo[playerid][pLevel] < 5)
{
SendClientMessage(playerid, COLOR_GRAD5, "Moras biti level 5 da narucis.");
return 1;
}
if(GetPlayerMoney(playerid) < 1000)
{
SendClientMessage(playerid, COLOR_GRAD5, "Nemas dovoljno novaca da to kupis.");
return 1;
}
HouseInfo[house][hHel] = 1;
GivePlayerMoney(playerid,-1000);
SBizzInfo[6][sbTill] += 2;//heal buisness
ExtortionSBiz(6, 2);
SBizzInfo[6][sbProducts]--;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD5, "Sad se mozes healati kod kuce, upisi /heal.");
}
}
else if(item == 2)
{
if (PlayerInfo[playerid][pLevel] < 7)
{
SendClientMessage(playerid, COLOR_GRAD5, "Moras biti lvl 7 da ovo kupis.");
return 1;
}
if(GetPlayerMoney(playerid) < 100000)
{
SendClientMessage(playerid, COLOR_GRAD5, "Nemas dovoljno novaca.");
return 1;
}
HouseInfo[house][hArm] = 1;
GivePlayerMoney(playerid,-2000);
SBizzInfo[6][sbTill] += 1;//heal buisness
ExtortionSBiz(6, 1);
SBizzInfo[6][sbProducts]--;
SendClientMessage(playerid, COLOR_GRAD5, "Sad mozes staviti armor kod kuce /heal.");
OnPropUpdate();
OnPlayerUpdate(playerid);
}
else return SCM(playerid, GRAD2, "Nemate kucu");
}
return 1;
}

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

Evo:
CMD:hu(playerid, params[])
{
    if(IsPlayerConnected(playerid))
{
new house = PlayerInfo[playerid][pPhousekey],playername[MAX_PLAYER_NAME],item;
GetPlayerName(playerid, playername, sizeof(playername));
if(house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
  if(sscanf(params, "i", item))
      {
SendClientMessage(playerid, BELA, "Koristite: /hu [item number]");
SendClientMessage(playerid, COLOR_GRAD1, "|________ House Upgrade ________|");
SendClientMessage(playerid, COLOR_GRAD2, "| 1: Health Upgrade $1000");
SendClientMessage(playerid, COLOR_GRAD3, "| 2: Armour Upgrade $2000");
return 1;
}
else if(item == 1)
{
if(PlayerInfo[playerid][pLevel] < 5)
{
SendClientMessage(playerid, COLOR_GRAD5, "Moras biti level 5 da narucis.");
return 1;
}
if(GetPlayerMoney(playerid) < 1000)
{
SendClientMessage(playerid, COLOR_GRAD5, "Nemas dovoljno novaca da to kupis.");
return 1;
}
HouseInfo[house][hHel] = 1;
GivePlayerMoney(playerid,-1000);
SBizzInfo[6][sbTill] += 2;//heal buisness
ExtortionSBiz(6, 2);
SBizzInfo[6][sbProducts]--;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD5, "Sad se mozes healati kod kuce, upisi /heal.");
}
else if(item == 2)
{
if (PlayerInfo[playerid][pLevel] < 7)
{
SendClientMessage(playerid, COLOR_GRAD5, "Moras biti lvl 7 da ovo kupis.");
return 1;
}
if(GetPlayerMoney(playerid) < 100000)
{
SendClientMessage(playerid, COLOR_GRAD5, "Nemas dovoljno novaca.");
return 1;
}
HouseInfo[house][hArm] = 1;
GivePlayerMoney(playerid,-2000);
SBizzInfo[6][sbTill] += 1;//heal buisness
ExtortionSBiz(6, 1);
SBizzInfo[6][sbProducts]--;
SendClientMessage(playerid, COLOR_GRAD5, "Sad mozes staviti armor kod kuce /heal.");
OnPropUpdate();
OnPlayerUpdate(playerid);
}
}
else return SCM(playerid, GRAD2, "Nemate kucu");
}
return 1;
}

Last nick: Paradox

radi sada, hvala e sad me zanima kako stavit da kad jedom upgradeas kucu sa heealom il amorurom i onda opet ides i pise vec ste nadoggradili kucu sa healom, isto tako i za armour.

CitatBrate to uradi ispod ovog /hu upgrade.. kucaj
SendClientMessage (playerid,COLOR_GRAD,"Vec ste nadogradili u kucu Heal / Armor.");
Eto sve sam ti rekao sada copy / paste u /hu cmd.