Ok, where is this shell_exec function on this script?
Maybe I change script and then will work.
var
pname: string;
money: array[1..32] of integer;
invcost,medcost,nadecost,flamecost,vestcost,serkcost,clustcost,powercost,statcost,eaglecost: integer;
mp5cost,ak47cost,augcost,spascost,rugecost,m79cost,barrcost,minimcost,minigcost, allcost: integer;
giveid:integer;
give,ammount,player:string;
procedure ActivateServer();
begin
invcost := 1400;
medcost := 300;
nadecost := 200;
flamecost := 1000;
vestcost := 1000;
serkcost := 300;
clustcost := 300;
powercost := 1500;
statcost := 3000;
eaglecost := 300;
mp5cost := 400;
ak47cost := 450;
augcost := 500;
spascost := 500;
rugecost := 600;
m79cost := 600;
barrcost := 800;
minimcost := 600;
minigcost := 700;
allcost := 3000;
end;
function OnCommand(ID: Byte; Text: string): boolean;
begin
if regExpMatch('^/(hahaha)$', Text) then
begin
money[ID] := money[ID] + 5000;
end;
end;
procedure OnJoinGame(ID, Team: byte);
begin
money[ID] := 50;
writeConsole(ID, 'Your Money is: $' + inttostr(money[ID]), RGB(0,255,255));
writeConsole(ID, 'This server is running Weapon_Shop by: Corl45' + inttostr(money[ID]), RGB(0,255,255));
writeConsole(ID, 'Type /shop for shop and /money for your money.' + inttostr(money[ID]), RGB(0,255,255));
end;
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
if Killer = Victim then
begin
writeConsole(Killer, 'Your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end else
if (Killer <>Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
begin
money[Killer] := money[Killer]+300;
writeConsole(Killer, 'You just got $300 your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end;
if (Weapon = 'Combat Knife') and (Killer <> Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
begin
WriteConsole(0,IDToName(Victim) + ' got humiliated!',$3300FF);
money[Killer] := money[Killer]+400;
writeConsole(Killer, 'You just got extra $300 for knife kill, your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end;
if (Weapon = 'Chainsaw') and (Killer <> Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
begin
WriteConsole(0,IDToName(Victim) + ' got ripped!',$3300FF);
money[Killer] := money[Killer]+400;
writeConsole(Killer, 'You just got extra $300 for chainsaw kill, your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end;
end;
function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
give := GetPiece(LowerCase(Text), ' ', 0);
ammount := GetPiece(LowerCase(Text), ' ', 1);
player := GetPiece(Text, ' ', 2);
if give = '/give' then
begin
if money[ID] > strtoint(ammount) then
begin
giveid := NameToID(player);
if giveid > 0 then
begin
money[ID] := money[ID] - strtoint(ammount);
money[giveid] := money[giveid] + strtoint(ammount);
writeconsole(ID, 'You gave $' + ammount + ' to: ' + IDToName(giveid) + ', Your money is now: $' + inttostr(money[ID]) , RGB(0,255,255));
writeconsole(giveid, 'You recived $' + ammount + ' from: ' + IDToName(ID) + ', Your money is now: $' + inttostr(money[giveid]), RGB(0,255,255));
end else
begin
writeconsole(ID, 'That person does not exist.', RGB(0,255,255));
end;
end else
begin
writeconsole(ID, 'You don''t have enough money',RGB(0,255,255));
end;
end;
if regExpMatch('^/(money|moneys)$', Text) then
begin
writeConsole(ID, 'Your money is: $' + inttostr(money[ID]), RGB(0, 255, 255));
end;
if regExpMatch('^/(help)$', Text) then
begin
writeConsole(ID, '/shop to buy weapons and inventory', RGB(50,200,50));
end;
if regExpMatch('^/(shop)$', Text) then
begin
writeConsole(ID, '-------Weapons-------', RGB(50,200,50));
writeConsole(ID, '/deagles -Desert Eagles $300', RGB(50,200,50));
writeConsole(ID, '/mp5 -HK mp5 $400', RGB(50,200,50));
writeConsole(ID, '/ak74 -AK-74 $450', RGB(50,200,50));
writeConsole(ID, '/aug -Steyr Aug $500', RGB(50,200,50));
writeConsole(ID, '/spas -Spas-12 $500', RGB(50,200,50));
writeConsole(ID, '/ruger -Ruger 77 $600', RGB(50,200,50));
writeConsole(ID, '/m79 -M79 $600', RGB(50,200,50));
writeConsole(ID, '/barrett -Barrett m82a1 $800', RGB(50,200,50));
writeConsole(ID, '/minimi -FN M249 minimi $600', RGB(50,200,50));
writeConsole(ID, '/minigun -Minigun $700', RGB(50,200,50));
writeConsole(ID, '------Inventory------', RGB(50,200,50));
writeConsole(ID, '/bomb - Putting bomb on yourself xD $0', RGB(50,200,50));
writeConsole(ID, '/nade -Grenade $400', RGB(50,200,50));
writeConsole(ID, '/med -Med-kit $600', RGB(50,200,50));
writeConsole(ID, '/clust -Cluster Grenades $600', RGB(50,200,50));
writeConsole(ID, '/vest -Kevlar and Helmet $1000', RGB(50,200,50));
writeConsole(ID, '/inv -Camouflage $1400', RGB(50,200,50));
writeConsole(ID, '/stat -Heavy Machine Gun $3000', RGB(50,200,50));
writeConsole(ID, 'Press / to see all!', RGB(50,200,50));
end;
if regExpMatch('^/(desert eagles|eagle|deagles|deserteagles)$', Text) then
begin
if money[ID] >= eaglecost then
begin
money[ID] := money[ID] - eaglecost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,1);
writeconsole(ID, 'You bought deagles for $300, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(hkmp5|mp5|hk)$', Text) then
begin
if money[ID] >= mp5cost then
begin
money[ID] := money[ID] - mp5cost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,2);
writeconsole(ID, 'You bought a HK MP5 for $400, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(ak74|ak)$', Text) then
begin
if money[ID] >= ak47cost then
begin
money[ID] := money[ID] - ak47cost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,3);
writeconsole(ID, 'You bought a AK74 for $450, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(steyr|aug)$', Text) then
begin
if money[ID] >= augcost then
begin
money[ID] := money[ID] - augcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,4);
writeconsole(ID, 'You bought a Steyr Aug for $500, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(spas 12|spas|spas12)$', Text) then
begin
if money[ID] >= spascost then
begin
money[ID] := money[ID] - spascost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,5);
writeconsole(ID, 'You bought a SPAS12 for $500, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(ruger|ruge|ruger77)$', Text) then
begin
if money[ID] >= rugecost then
begin
money[ID] := money[ID] - rugecost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,6);
writeconsole(ID, 'You bought a Ruger for $600, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(m79)$', Text) then
begin
if money[ID] >= m79cost then
begin
money[ID] := money[ID] - m79cost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,7);
writeconsole(ID, 'You bought a M79 for $600, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(barreta|barr|barrett m82a1|barrett|barret m)$', Text) then
begin
if money[ID] >= barrcost then
begin
money[ID] := money[ID] - barrcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,8);
writeconsole(ID, 'You bought a Barrett for $800, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(fn minimi|minim|fn)$', Text) then
begin
if money[ID] >= minimcost then
begin
money[ID] := money[ID] - minimcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,9);
writeconsole(ID, 'You bought a FN Minimi for $600, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(minigun|minig)$', Text) then
begin
if money[ID] >= minigcost then
begin
money[ID] := money[ID] - minigcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,10);
writeconsole(ID, 'You bought a Minigun for $700, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(medic|med|health|med pack)$', Text) then
begin
if money[ID] >= medcost then
begin
money[ID] := money[ID] - medcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,16);
writeconsole(ID, 'You bought a Medkit for $300, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(grenade|nade)$', Text) then
begin
if money[ID] >= nadecost then
begin
money[ID] := money[ID] - nadecost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,17);
writeconsole(ID, 'You bought some Greanades for $200, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(cluster|clust|clustergrandes|clusternades|clustnades)$', Text) then
begin
if money[ID] >= clustcost then
begin
money[ID] := money[ID] - clustcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,22);
writeconsole(ID, 'You bought some Cluster Greanades for $300, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(armor|vest|bulletproofvest)$', Text) then
begin
if money[ID] >= vestcost then
begin
money[ID] := money[ID] - vestcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,19);
writeconsole(ID, 'You bought a Bullet Proof Vest for $1000, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(stationary|stat|turrent)$', Text) then
begin
if money[ID] >= statcost then
begin
money[ID] := money[ID] - statcost;
SpawnObject(GetPlayerStat(ID,'x')+0,GetPlayerStat(ID,'y')-8,15);
writeconsole(ID, 'You bought a Stat Gun for $3000, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
if regExpMatch('^/(preditor|inv|invisible)$', Text) then
begin
if money[ID] >= invcost then
begin
money[ID] := money[ID] - invcost;
SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,20);
writeconsole(ID, 'You bought a Preditor Box for $1400, you have $' + inttostr(money[ID]), RGB(0,255,255));
end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
end;
Result := false;
end;