![]() |
|
05-22-2014
|
1 |
|
Banned
Join Date: Jan 2014
Posts: 61
|
Need Help With This script
//#CLIENTSIDE { function onPlayerChats() if(player.chat == "/big") player.zoom = 5; if(player.chat == "/small") player.zoom = 0.5; if(player.chat == "/normal") player.zoom = 1; } 1. So everyone can see ur size not just you. 2.Staff Only. Can anyone help thanks! |
|
05-22-2014
|
2 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
There are several things wrong with your script. ![]() a) Your curly brace shouldn't be there. I'm guessing it's just misplaced? b) You need to follow your function declaration with a curly brace '{' c) You can trim this code by using a switch and case statement. Here's a fixed/improved version of your code based on the points made above: PHP Code:
Here's an example on how you can use a GANI to get the desired effect: zoom_big.gani PHP Code:
PHP Code:
PHP Code:
Last edited by Emera; 05-22-2014 at 08:42 PM.
|
|
05-22-2014
|
3 |
|
Banned
Join Date: Jan 2014
Posts: 61
|
Are the ganis already in the server?
|
|
05-22-2014
|
4 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
|
|
05-22-2014
|
5 |
|
Banned
Join Date: Jan 2014
Posts: 61
|
How do I add a code into a gani
|
|
05-22-2014
|
6 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
|
|
05-22-2014
|
7 |
|
Banned
Join Date: Jan 2014
Posts: 61
|
am on mac. so I copy what you put into the gani file how? Do I change it to txt first and idk |
|
05-22-2014
|
8 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
|
|
05-22-2014
|
9 |
|
Banned
Join Date: Jan 2014
Posts: 61
|
Can I open text editor, paste the code, put .gani at the and drag it in
|
|
05-22-2014
|
10 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
Ugh... 1) Create a new file 2) Change the extension to '.gani' 3) Open the file in a text editor 4) Paste the content into the file 5) Save the file |
|
05-22-2014
|
11 |
|
Banned
Join Date: Jan 2014
Posts: 61
|
A new text edit file or gani file
|
|
05-22-2014
|
12 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
Last edited by Emera; 05-22-2014 at 09:22 PM.
Reason: *breathes*
|
|
05-22-2014
|
13 |
|
Banned
Join Date: Jan 2014
Posts: 61
|
Don't think its working Weapon name: -Size 1.open text edit file 2.copied stuff 3.named it zoom_big.gani 4.re opened it with text edit its still there 5.put it in ganis and ganis/weapons 6.added -Size to myself 7.wont work Could it be that in text edit it has green highlights around it? wait
Last edited by Xadis; 05-22-2014 at 10:18 PM.
|
|
05-23-2014
|
14 |
|
Registered User
Join Date: Jun 2013
Location: Zol's Pub
Posts: 373
|
attach the gani. also, post all of the code. |