This commit is contained in:
2011-03-10 19:28:10 +00:00
parent 9862df91ba
commit 8daf501fc9
+22 -22
View File
@@ -9549,49 +9549,49 @@ public OnPlayerCommandText(playerid, cmdtext[])
new guncharge;
new ammocharge;
new location = PlayerInfo[playerid][pLocal];
if(location < 99 || location == 255)
if(location < 99 || location == -1)
{
SendClientMessage(playerid, COLOR_WHITE,"Âû íå â îðóæåéíîì ìàãàçèíå");
SendClientMessageRus(playerid, COLOR_WHITE,"Âû íå â îðóæåéíîì ìàãàçèíå.");
return 1;
}
new mod = (BizzInfo[location-99][bPriceMod]);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "Èñïîëüçóé: /buygun [íàçâàíèå îðóæèÿ] [êîë-âî ïàòðîíîâ]");
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessage(playerid, COLOR_WHITE,"*** Îðóæèå & ïàòðîíû ***");
SendClientMessage(playerid, COLOR_GRAD2,string);
format(string, sizeof(string), "ÈÑÏÎËÜÇÎÂÀÍÈÅ: /buygun [gunname] [ammoamount]");
SendClientMessageRus(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessageRus(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
SendClientMessageRus(playerid, COLOR_GRAD2,string);
format(gunstring1, 256, "Îðóæèå: parachute ($%d) golfclub ($%d) nightstick ($%d) knife ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
GunPrice[0][0]/100*mod,GunPrice[1][0]/100*mod,GunPrice[2][0]/100*mod,GunPrice[3][0]/100*mod,GunPrice[4][0]/100*mod,GunPrice[5][0]/100*mod,GunPrice[6][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
SendClientMessageRus(playerid, COLOR_GRAD3, gunstring1);
format(gunstring2, 256, "Îðóæèå: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
GunPrice[7][0]/100*mod,GunPrice[8][0]/100*mod,GunPrice[9][0]/100*mod,GunPrice[10][0]/100*mod,GunPrice[11][0]/100*mod,GunPrice[12][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
SendClientMessageRus(playerid, COLOR_GRAD3, gunstring2);
format(gunstring3, 256, "Îðóæèå: sdpistol ($%d) colt45 ($%d) deagle ($%d) tec9 ($%d) uzi ($%d) mp5 ($%d)",
GunPrice[13][0]/100*mod,GunPrice[14][0]/100*mod,GunPrice[15][0]/100*mod,GunPrice[16][0]/100*mod,GunPrice[17][0]/100*mod,GunPrice[18][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
SendClientMessageRus(playerid, COLOR_GRAD3, gunstring3);
format(gunstring4, 256, "Îðóæèå: shotgun ($%d) spas12 ($%d)sawnoff ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
GunPrice[19][0]/100*mod,GunPrice[20][0]/100*mod,GunPrice[21][0]/100*mod,GunPrice[22][0]/100*mod,GunPrice[23][0]/100*mod,GunPrice[24][0]/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
SendClientMessageRus(playerid, COLOR_GRAD3, gunstring4);
format(gunstring5, 256, "Îðóæèå: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
GunPrice[25][0],GunPrice[26][0],GunPrice[27][0],GunPrice[28][0],GunPrice[29][0]);
SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessageRus(playerid, COLOR_GRAD3, gunstring5);
SendClientMessageRus(playerid, COLOR_GREEN,"_______________________________________");
return 1;
}
strmid(gunid, tmp, 0, strlen(cmdtext), 255);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "USAGE: /buygun [íàçâàíèå îðóæèÿ] [êîë-âî ïàòðîíîâ]");
format(string, sizeof(string), "ÈÑÏÎËÜÇÎÂÀÍÈÅ: /buygun [gunname] [ammoamount]");
return 1;
}
new ammo = strval(tmp);
/*
if (PlayerInfo[playerid][pLevel] >= 13 && (strcmp(gunid, "minigun", true, strlen(gunid)) == 0))
{
SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: You Will Now Spawn With A minigun");
SendClientMessageRus(playerid, COLOR_GRAD6, "New Upgrade: You Will Now Spawn With A minigun");
PlayerInfo[playerid][pGun6] = 38;
ResetPlayerWeapons(playerid);
SetPlayerWeapons(playerid);
@@ -9600,13 +9600,13 @@ public OnPlayerCommandText(playerid, cmdtext[])
if (PlayerInfo[playerid][pLevel] >= 12 && (strcmp(gunid, "flamethrower", true, strlen(gunid)) == 0))
{
SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: You Will Now Spawn With A flamethrower");
SendClientMessageRus(playerid, COLOR_GRAD6, "New Upgrade: You Will Now Spawn With A flamethrower");
PlayerInfo[playerid][pGun6] = 37;
}
*/
if(ammo < 0 || ammo > 999)
if(ammo < 0 || ammo > 9999)
{
SendClientMessage(playerid, COLOR_RED, "Òû íåìîæåø ïîêóïàòü áîëüøå 999 ïàòðîíîâ çà îäèí ðàç");
SendClientMessageRus(playerid, COLOR_RED, "Âû íå ìîæåòå ïîêóïàòü áîëüøå 9999 ïàòðîíîâ çà îäèí ðàç!");
return 1;
}
@@ -9762,18 +9762,18 @@ public OnPlayerCommandText(playerid, cmdtext[])
}
else
{
SendClientMessage(playerid, COLOR_GRAD6, "Íèêîãäà íå ñëûøàë î òàêîì îðóæèå");
SendClientMessageRus(playerid, COLOR_GRAD6, "Îðóæåéíèê: íèêîãäà íå ñëûøàë î òàêîé ïóøêå.");
return 1;
}
if((guncharge+ammocharge) > GetPlayerMoney(playerid))
if((guncharge+ammocharge) > PlayerInfo[playerid][pCash])
{
format(infostring, 256, "Íåäîñòàòî÷íî äåíåã $%d",guncharge+ammocharge);
SendClientMessage(playerid, COLOR_GRAD3, infostring);
SendClientMessageRus(playerid, COLOR_GRAD3, infostring);
return 1;
}
format(infostring, 256, "Âû êóïèëè %s ñ %d ïàòðîíàìè çà $%d",gunid,ammo,guncharge+ammocharge);
SendClientMessage(playerid, COLOR_GRAD3, infostring);
GivePlayerMoney(playerid,-(guncharge+ammocharge));
SendClientMessageRus(playerid, COLOR_GRAD3, infostring);
SafeGivePlayerMoney(playerid,-(guncharge+ammocharge));
BizzInfo[location-99][bTakings] = BizzInfo[location-99][bTakings]+(guncharge+ammocharge);
BizzInfo[location-99][bProd]--;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);