View Single Post
  #3  
Old 02-05-2006, 03:13 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Coolkid77742
Ok I need a Script kinda like a mp pot that adds mp... then destroys im trying
//#CLIENTSIDE
if (weaponfired) playermp += +60; destroy; .... but then the mp adds when its fired then it dissapears
First, you'll want it to be:

NPC Code:
playermp += 60;



and not += +60.

Second, if you want more than one line of code to be executed if that if statement evaluates as true, you're going to want to make use of braces, such as { and }.

Example:

NPC Code:
if (condition) {
var1 = "blue"; // Line 1
var2 = 3; // Line 2
}



Third (as Napo posted), you should probably be changing the playermp/player.mp variable serverside.

Please refer to KSI-GS in the main scripting forum's advice thread. Also, you probably posted this thread in the wrong forum. This forum is for GS2-specific questions, and not only is your code entirely GS1 but your question has nothing to do with the new scripting engine.
Reply With Quote