Raised This Month: $ Target: $400
 0% 

Please help me with my first stupid plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sp3rMiNaToR
BANNED
Join Date: Apr 2009
Location: Greece ^_^
Old 08-23-2009 , 10:27   Re: Please help me with my first stupid plugin
Reply With Quote #1

Quote:
Originally Posted by tuty View Post
-.- here is the working version

Thanks,i saw the things that were bad or wrong in my code!But i can't understand one thing:
What exactly is this 1???Where this helps??
Quote:
cs_set_user_money(id, money - cost, 1);
And why don't you have it here in drink,but only in food?
Quote:
cs_set_user_money(id, money - cost);
And why don't you use "else"?If i put "else over this:
Quote:
cs_set_user_money(id, money - cost);
set_user_health(id, get_user_health(id) + 30 );
set_user_gravity(id, 0.70 );
client_print(id, print_chat, "Molis agorases mia coca cola max!Eisai sta alitheia esy?");
What will happen??How this works without else??o0

Last edited by Sp3rMiNaToR; 08-23-2009 at 10:38.
Sp3rMiNaToR is offline
Send a message via MSN to Sp3rMiNaToR
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-23-2009 , 13:17   Re: Please help me with my first stupid plugin
Reply With Quote #2

Quote:
Originally Posted by Sp3rMiNaToR View Post
What will happen??How this works without else??o0
Try it and find out for yourself.
__________________
fysiks is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 08-23-2009 , 18:35   Re: Please help me with my first stupid plugin
Reply With Quote #3

Quote:
Originally Posted by Sp3rMiNaToR View Post

What will happen??How this works without else??o0
because first time check if plugin is on, second time if player has enough money to buy something, and finally when player has enough money, do that commands ^^ not a big deal, works with else too. :/
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
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 -4. The time now is 15:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode