View Single Post
  #10  
Old 05-30-2011, 12:12 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Okay, now I really am at my wit's end with this...
Okay, I have a GuiTextList with all the weapon names listed without the weapon prefix, without the .txt and the special characters escaped.
So, I press a GuiButton to send the selected text to the serverside using triggerserver(), which is fine.
Say, for example, I selected "Personal/iBeatz/Test" in the GuiTextList:

PHP Code:
triggerserver("gui",name,"LoadScript","weapon",Category_List.getSelectedText()); 
Then it is called on the serverside like so:

PHP Code:
function onActionServerSide(){
 if(
params[0] == "LoadScript"){
  if(
params[1] == "weapon"){
   
temp.sname params[2];
   
temp.scr.loadlines("weapons/weapon"@temp.sname@".txt");
   
findPlayer("Graal749838").chat "weapons/weapon"@temp.sname@".txt";
  }
 }

I'm frustrated because temp.scr always ends up as 0, but my chat is always the string I want.
I have also tried this with a script file as well, and still nothing works.
This is so annoying...
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote