[POMOC] Skladiste

Započeo Danisha, Decembar 11, 2012, 20:22:03 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:ravens preradjeni zcmd
Detaljan opis problema:E ovako pravim skladiste i sada napravio sam nesto sada mi je pomoc oko komande jedne
Dio skripte:
enum skInfo
{
skDrugs,
skMaterials,
skWeapon1,
skAmmo1,
skWeapon2,
skAmmo2,
skWeapon3,
skAmmo3,
skWeapon4,
skAmmo4,
skWeapon5,
skAmmo5,
};

new SkladisteInfo[2][skInfo];
CMD:takeguns(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new x_nr[24];
new string[128],sendername[MAX_PLAYER_NAME],ammo;
GetPlayerName(playerid,sendername,sizeof(sendername));
if(sscanf(params,"s[24]D",x_nr,ammo))
{
SCM(playerid, COLOR_WHITE, "Koriscenje: /takeguns [slot 1-5] [kolicina]");
return 1;
}
if(ReduceTime[playerid] == 1)
{
SCM(playerid, COLOR_GREY, "   Moras sacekati 3 sekunde da ponovo koristis ovu komandu !");
return 1;
}
if(ServerRestartovan == 1) return 1;
new house = PlayerInfo[playerid][pHouseKey];
if(strcmp(sendername, HouseInfo[house][hOwner], true) == 0 && house != 9999 || PlayerInfo[playerid][Admin] >= 1338)
{
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
if(strcmp(x_nr,"1",true) == 0 || strcmp(x_nr,"1",true) == 0)
{
new gunname[24];
new weapon = HouseInfo[house][hWeapon1];
GetWeaponName(weapon,gunname, sizeof(gunname));
if(IsPlayerInRangeOfPoint(playerid, 15, HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
{
if(sscanf(params,"s[24]d",x_nr,ammo))
{
SCM(playerid, COLOR_GRAD1, "Koriscenje: /uzmi oruzje1 [ammo]");
format(string, sizeof(string),"* You have a %s with %d Bullets at the Slot 1",gunname, HouseInfo[house][hAmmo1]);
SCM(playerid, COLOR_GRAD1, string);
return 1;
}
if(ammo < 0 || ammo > HouseInfo[house][hAmmo1])
{
SCM(playerid, COLOR_GREY, "   You don't have so many Ammo.");
return 1;
}
if(HouseInfo[house][hWeapon1] != 0)
{
SafeGivePlayerWeapon(playerid, weapon, ammo);
if(ammo == HouseInfo[house][hAmmo1]) HouseInfo[house][hWeapon1] = 0;
HouseInfo[house][hAmmo1] -= ammo;
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s takes out his %s and places it at his backpack.", sendername,gunname); }
else { format(string, sizeof(string), "* %s takes out her %s and places it at her backpack.", sendername,gunname); }
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
new y1, m, d;
new h,mi,s;
getdate(y1,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /load weapon %d (%s)",d,m,y1,h,mi,s,sendername, ammo, gunname);
CommandLog(string);
OnPropUpdate(1, house);
}
else
{
SCM(playerid, COLOR_GREY,"* There is nothing on this slot!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY,"Niste u skladistu!");
return 1;
}
}
else if(strcmp(x_nr,"2",true) == 0 || strcmp(x_nr,"2",true) == 0)
{
new gunname[24];
new weapon = HouseInfo[house][hWeapon2];
GetWeaponName(weapon,gunname, sizeof(gunname));
if(IsPlayerInRangeOfPoint(playerid, 15, HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
{
if(sscanf(params,"s[24]d",x_nr,ammo))
{
SCM(playerid, COLOR_GRAD1, "Koriscenje: /uzmi oruzje2 [ammo]");
format(string, sizeof(string),"* You have a %s with %d Bullets at the Slot 2",gunname, HouseInfo[house][hAmmo2]);
SCM(playerid, COLOR_GRAD1, string);
return 1;
}
if(ammo < 0 || ammo > HouseInfo[house][hAmmo2])
{
SCM(playerid, COLOR_GREY, "   You don't have so many Ammo.");
return 1;
}
if(HouseInfo[house][hWeapon2] != 0)
{
SafeGivePlayerWeapon(playerid, weapon, ammo);
if(ammo == HouseInfo[house][hAmmo2]) HouseInfo[house][hWeapon2] = 0;
HouseInfo[house][hAmmo2] -= ammo;
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s takes out his %s and places it at his backpack.", sendername,gunname); }
else { format(string, sizeof(string), "* %s takes out her %s and places it at her backpack.", sendername,gunname); }
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
new y1, m, d;
new h,mi,s;
getdate(y1,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /load weapon2 %d (%s)",d,m,y1,h,mi,s,sendername, ammo, gunname);
CommandLog(string);
OnPropUpdate(1, house);
}
else
{
SCM(playerid, COLOR_GREY,"* There is nothing on this slot!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY,"Niste u skladistu!");
return 1;
}
}
else if(strcmp(x_nr,"3",true) == 0 || strcmp(x_nr,"3",true) == 0)
{
new gunname[24];
new weapon = HouseInfo[house][hWeapon3];
GetWeaponName(weapon,gunname, sizeof(gunname));
if(IsPlayerInRangeOfPoint(playerid, 15, HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
{
if(sscanf(params,"s[24]d",x_nr,ammo))
{
SCM(playerid, COLOR_GRAD1, "Koriscenje: /uzmi oruzje3 [ammo]");
format(string, sizeof(string),"* You have a %s with %d Bullets at the Slot 3",gunname, HouseInfo[house][hAmmo3]);
SCM(playerid, COLOR_GRAD1, string);
return 1;
}
if(ammo < 0 || ammo > HouseInfo[house][hAmmo3])
{
SCM(playerid, COLOR_GREY, "   You don't have so many Ammo.");
return 1;
}
if(HouseInfo[house][hWeapon3] != 0)
{
SafeGivePlayerWeapon(playerid, weapon, ammo);
if(ammo == HouseInfo[house][hAmmo3]) HouseInfo[house][hWeapon3] = 0;
HouseInfo[house][hAmmo3] -= ammo;
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s takes out his %s and places it at his backpack.", sendername,gunname); }
else { format(string, sizeof(string), "* %s takes out her %s and places it at her backpack.", sendername,gunname); }
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
new y1, m, d;
new h,mi,s;
getdate(y1,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /load weapon3 %d (%s)",d,m,y1,h,mi,s,sendername, ammo, gunname);
CommandLog(string);
OnPropUpdate(1, house);
}
else
{
SCM(playerid, COLOR_GREY,"* There is nothing on this slot!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY,"Niste u skladistu!");
return 1;
}
}
else if(strcmp(x_nr,"4",true) == 0 || strcmp(x_nr,"4",true) == 0)
{
new gunname[24];
new weapon = HouseInfo[house][hWeapon4];
GetWeaponName(weapon,gunname, sizeof(gunname));
if(IsPlayerInRangeOfPoint(playerid, 15, HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
{
if(sscanf(params,"s[24]d",x_nr,ammo))
{
SCM(playerid, COLOR_GRAD1, "Koriscenje: /uzmi oruzje4 [ammo]");
format(string, sizeof(string),"* You have a %s with %d Bullets at the Slot 4",gunname, HouseInfo[house][hAmmo4]);
SCM(playerid, COLOR_GRAD1, string);
return 1;
}
if(ammo < 0 || ammo > HouseInfo[house][hAmmo4])
{
SCM(playerid, COLOR_GREY, "   You don't have so many Ammo.");
return 1;
}
if(HouseInfo[house][hWeapon4] != 0)
{
SafeGivePlayerWeapon(playerid, weapon, ammo);
if(ammo == HouseInfo[house][hAmmo4]) HouseInfo[house][hWeapon4] = 0;
HouseInfo[house][hAmmo4] -= ammo;
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s takes out his %s and places it at his backpack.", sendername,gunname); }
else { format(string, sizeof(string), "* %s takes out her %s and places it at her backpack.", sendername,gunname); }
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
new y1, m, d;
new h,mi,s;
getdate(y1,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /load weapon4 %d (%s)",d,m,y1,h,mi,s,sendername, ammo, gunname);
CommandLog(string);
OnPropUpdate(1, house);
}
else
{
SCM(playerid, COLOR_GREY,"* There is nothing on this slot!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY,"Niste u skladistu");
return 1;
}
}
else if(strcmp(x_nr,"5",true) == 0 || strcmp(x_nr,"5",true) == 0)
{
new gunname[24];
new weapon = HouseInfo[house][hWeapon5];
GetWeaponName(weapon,gunname, sizeof(gunname));
if(IsPlayerInRangeOfPoint(playerid, 15, HouseInfo[house][hExitx],HouseInfo[house][hExity],HouseInfo[house][hExitz]))
{
if(sscanf(params,"s[24]d",x_nr,ammo))
{
SCM(playerid, COLOR_GRAD1, "Koriscenje: /uzmi oruzje5 [ammo]");
format(string, sizeof(string),"* You have a %s with %d Bullets at the Slot 5",gunname, HouseInfo[house][hAmmo5]);
SCM(playerid, COLOR_GRAD1, string);
return 1;
}
if(ammo < 0 || ammo > HouseInfo[house][hAmmo5])
{
SCM(playerid, COLOR_GREY, "   You don't have so many Ammo.");
return 1;
}
if(HouseInfo[house][hWeapon5] != 0)
{
SafeGivePlayerWeapon(playerid, weapon, ammo);
if(ammo == HouseInfo[house][hAmmo5]) HouseInfo[house][hWeapon5] = 0;
HouseInfo[house][hAmmo5] -= ammo;
if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s takes out his %s and places it at his backpack.", sendername,gunname); }
else { format(string, sizeof(string), "* %s takes out her %s and places it at her backpack.", sendername,gunname); }
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
new y1, m, d;
new h,mi,s;
getdate(y1,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /load weapon5 %d (%s)",d,m,y1,h,mi,s,sendername, ammo, gunname);
CommandLog(string);
OnPropUpdate(1, house);
}
else
{
SCM(playerid, COLOR_GREY,"* There is nothing on this slot!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY,"Niste u skladistu!");
return 1;
}
}
}
else
{
SCM(playerid, COLOR_GREY, "Niste u ovlasteni!");
return 1;
}
}
return 1;
}

i evo uzeo sam komandu od kuce za uzivanje guna i kako sada da sredim da moze id organizacije 22 i 16 da stavlja gun u skladistu preko ove komande gore i koridinate
kordinate organizacije 22 1484.3933,-1731.2124,6.7213
kordinate organizacije 16  1689.2598,-5987.6985,1.6958
HVALA UNAPRED
Neke slike/video za lakse dobivanje pomoci(neobavezno): ////

ne razumem te sta tacno zelis, objasni ?

Sada zelim da sredim da mi neko prepravi ovu komandu /takeguns sto sam gore dao ja sam nju uzeo iz sistema kuce za uzimanje guna i sada bi hteo da mi neko preradi tu komandu po ovom gore i dao sam kordinate ko moze sve da uzima i gdje, sada jasnije?