Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.