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 , 09:46   Please help me with my first stupid plugin
Reply With Quote #1

Hello all!I started learning scripting 2 days ago,and i tried to make a small and stupid plugin to make a joke to a friend of mine!When compiling,i get some errors,and i think they're caused by one thing i can't find out!I post here the .sma file and if someone could help me finding out from where the errors come from,fix my file and upload it fixed,i'd appreciate that!If someone decides to help me,please show me the places in the code i made mistakes!Thanks in advance!
Edit:The code is very small,you won't get tired .
Attached Files
File Type: sma Get Plugin or Get Source (goodys.sma - 516 views - 2.2 KB)
Sp3rMiNaToR is offline
Send a message via MSN to Sp3rMiNaToR
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 08-23-2009 , 09:56   Re: Please help me with my first stupid plugin
Reply With Quote #2

-.- here is the working version

Attached Files
File Type: sma Get Plugin or Get Source (goodyes.sma - 546 views - 2.0 KB)
__________________

Last edited by tuty; 08-23-2009 at 10:07.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
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 #3

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 #4

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 #5

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
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-23-2009 , 10:03   Re: Please help me with my first stupid plugin
Reply With Quote #6

So harsh, he started two days ago. I remember the days when people said the same about Tuty's code.
__________________
Bad_Bud is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 08-23-2009 , 10:06   Re: Please help me with my first stupid plugin
Reply With Quote #7

Quote:
Originally Posted by Bad_Bud View Post
So harsh, he started two days ago. I remember the days when people said the same about Tuty's code.
me too
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-23-2009 , 10:07   Re: Please help me with my first stupid plugin
Reply With Quote #8

lol
__________________
Bad_Bud is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-23-2009 , 10:49   Re: Please help me with my first stupid plugin
Reply With Quote #9

http://www.amxmodx.org/funcwiki.php?...oney&go=search
__________________
xPaw is offline
Sp3rMiNaToR
BANNED
Join Date: Apr 2009
Location: Greece ^_^
Old 08-23-2009 , 10:53   Re: Please help me with my first stupid plugin
Reply With Quote #10

Thanks!There are some things i didn't read!
Sp3rMiNaToR is offline
Send a message via MSN to Sp3rMiNaToR
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