AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Please help me with my first stupid plugin (https://forums.alliedmods.net/showthread.php?t=101375)

Sp3rMiNaToR 08-23-2009 09:46

Please help me with my first stupid plugin
 
1 Attachment(s)
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 :D.

tuty 08-23-2009 09:56

Re: Please help me with my first stupid plugin
 
1 Attachment(s)
-.- here is the working version

:arrow:

Bad_Bud 08-23-2009 10:03

Re: Please help me with my first stupid plugin
 
So harsh, he started two days ago. I remember the days when people said the same about Tuty's code.

tuty 08-23-2009 10:06

Re: Please help me with my first stupid plugin
 
Quote:

Originally Posted by Bad_Bud (Post 910134)
So harsh, he started two days ago. I remember the days when people said the same about Tuty's code.

me too :|

Bad_Bud 08-23-2009 10:07

Re: Please help me with my first stupid plugin
 
lol

Sp3rMiNaToR 08-23-2009 10:27

Re: Please help me with my first stupid plugin
 
Quote:

Originally Posted by tuty (Post 910126)
-.- here is the working version

:arrow:

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?:P");
What will happen??How this works without else??o0

xPaw 08-23-2009 10:49

Re: Please help me with my first stupid plugin
 
http://www.amxmodx.org/funcwiki.php?...oney&go=search

Sp3rMiNaToR 08-23-2009 10:53

Re: Please help me with my first stupid plugin
 
Quote:

Originally Posted by xPaw (Post 910159)

Thanks!There are some things i didn't read!:D

fysiks 08-23-2009 13:17

Re: Please help me with my first stupid plugin
 
Quote:

Originally Posted by Sp3rMiNaToR (Post 910150)
What will happen??How this works without else??o0

Try it and find out for yourself.

tuty 08-23-2009 18:35

Re: Please help me with my first stupid plugin
 
Quote:

Originally Posted by Sp3rMiNaToR (Post 910150)

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. :/


All times are GMT -4. The time now is 15:04.

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