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 onActionServerSide( cmd )
{
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