View Single Post
  #3  
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