Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-05-2011, 07:34 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Your code indenting/styling is very inconsistent, either use tabs only or spaces only.

A quick glance reveals this error:

PHP Code:
function onPlayertouchsme() { 
    
addweapon("Personal/kingcj/haticon"); 
    
clientr.hat_array = {0,1,2,3,4,5}; 
 }  
 else if (
clientr.hat_array = {0,1,2,3,4,5}) {     //My goal here was if the player had the weapon it wouldn't reset the hat array... Doesn't work very well. 
          
addweapon("Personal/kingcj/haticon"); 
  } 
The problem: You're doing else if on a function.

Edit: Looks like you already touched on that cbk.

You're drawing a hat on 199 but the others on 201, and 202. 199 is a global index so other player's would see that random hat but not the others.

You might benefit from learning how to use functions to your advantage so you don't have everything in onKeyPressed.
__________________
Quote:

Last edited by fowlplay4; 09-06-2011 at 03:34 AM..
Reply With Quote
Reply


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 04:01 PM.


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