View Single Post
  #5  
Old 07-31-2009, 01:31 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
This kid asked for help on a script, not how he would get some help. sheesh

Gulthex since this is my gun script, I am quite pissed, however I will show you a simple way of making it serversided.

put this at the top of the script!
PHP Code:
function onActionServerSidecmd )
{
  switch( 
cmd )
  {
    case 
"hp":
    {
clientr.hp -= 10;    //PUT WATEVER YOU WANT IT TO -
  
}
 }

Then put this at the bottom where you currently have the actionprojectile:
PHP Code:
if (actionprojectile
{
  if(
strequals(#p(index),PARAMEQUALS)) 

triggerserver("weapon"this.name"hp");   //TRIGGERS SCRIPT AT TOP
 
}

Also heres a little tip for you. after you script a script, go to rc and type :

If it's a weapon script:
PHP Code:
/style weapon WEAPON NAME 
if it's a NPC script:
PHP Code:
/style npc NPCNAME 
if it's a class:
PHP Code:
/style class CLASSNAME 
I hope this helped ;D
Reply With Quote