Thread: Trade System
View Single Post
  #6  
Old 11-08-2009, 07:38 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I just took another look at the code, and noticed a few things...
  • Never trust the client, you're assuming the player has the weapon they say they have and not checking if they really have it serverside. Remember that (with the right utilities), any variable can be changed on clientside, and any function can be called, removed, or renamed.
  • You're doing stuff like for (i=0; i<p1.size(); i++), where you can just do for (temp.i : p1) {
  • Stuff like {"no", "no"} can be {false, false}, which is probably easier to read, but I guess that's just personal style
__________________
Reply With Quote