Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   On player online (https://forums.graalonline.com/forums/showthread.php?t=134256781)

GULTHEX 11-02-2009 07:05 PM

On player online
 
How would i add a weapon to the player when they come online.

i had a backup but i lost it after a full reboot of my cpu.

so can anybody explan to me the command.

Deas_Voice 11-02-2009 07:19 PM

please don't say cpu when you mean your computer, a "CPU" is a component IN your computer.

you can add weapons when the player comes online with
PHP Code:

function onActionPlayerOnline() 

by doing
PHP Code:

player.addweapon("WeaponName"); 


cyan3 11-02-2009 07:23 PM

You could add weapons using a variable to store the values of the weapon names and add them to the player on login. Using a variable is much more efficient if you want to add multiple weapons on login. Here is quick example.

PHP Code:

function onActionPlayerOnline() {

  
temp.weps =
  {
    
"-Weapon1",
    
"-Weapon2",
    
"-Weapon3",
    
"-Weapon4",
  };
  
  for(
temp.weptemp.weps)
  {
    
player.addweapon(temp.wep);
  }  



GULTHEX 11-02-2009 07:54 PM

Thank you guys i think i got wat i needed

close thread.

DustyPorViva 11-02-2009 09:13 PM

Quote:

Originally Posted by GULTHEX (Post 1535870)
close thread.

http://techgeist.net/files/2009/07/p...-objection.jpg

cbk1994 11-02-2009 11:03 PM

Quote:

Originally Posted by GULTHEX (Post 1535870)
close thread.

What Dusty means to say is that there's no reason to close a thread because people will stop posting in it anyway ^^.


All times are GMT +2. The time now is 09:33 PM.

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