![]() |
Radio Example
I made a simple Radio/DJ Weapon which some servers may find useful. I made it for Graal X but I like sharing my work =)
As with any additions I have posted/will post - it is Add and Play. Simply create the Radio weapon (Call it anything) and a DBNPC named RadioDB. Preload with 3 Lemon Jelly songs found off Windows Media. Good stuff to listen to while coding. This is the weapon PHP Code:
PHP Code:
|
While normally I disapprove of serverr. strings for a lot of uses, a radio is a definite use for them. You can access them clientside, which means you don't have to triggerclient() to everyone on the server when you are changing song, and you can only write to them on the serverside for security.
It seems overkill to use a database, and triggerclient in this way. |
I hate using serverr strings as well. The script could even be integrated into Control NPC anyways =P
Maybe i'll make a serverr strings version as well =) |
I preffer using a database since server and serverr strings are limited in length.
|
Eh, twinny - thats not the updated one on GX atm. =o
|
I kept working on the GX one -_-
|
when i post it in it has errors what do i do
|
Quote:
|
Quote:
|
Quote:
Also, looking at this code made me laugh...so many things I would have done differently and I love my, "open source" comment at the top :D |
lets see
Quote:
Script compiler output for radio: <b>error: unexpected token: * at line 1: * Made by Twinny under Open Source */ <b>error: missing semicolon at line 1: * Made by Twinny under Open Source */ <b>error: unexpected token: / at line 1: * Made by Twinny under Open Source */ Weapon/GUI-script radio added/updated by GULTHEX <b>Script: Function addcontrol not found at line 102 in script of radio <b>Script: Function addcontrol not found at line 94 in script of radio <b>Script: Function addcontrol not found at line 113 in script of radio <b>Script: Function addcontrol not found at line 122 in script of radio <b>Script: Function addcontrol not found at line 131 in script of radio <b>Script: Function addcontrol not found at line 140 in script of radio <b>Script: Function addcontrol not found at line 147 in script of radio <b>Script: Function addcontrol not found at line 154 in script of radio <b>Script: Function addcontrol not found at line 82 in script of radio <b>Script: Function Radio_Window.setText not found at line 163 in script of radio <b>Script: Function triggerserver not found at line 169 in script of radio <b>Script: Function GraalControl.addControl not found at line 165 in script of radio |
Quote:
|
The "Function addcontrol not found" means you're trying to use the special GUI Control syntax on serverside, which doesn't work obviously because GraalControl is clientside.
|
Rofl I love the "Leave my Name in ;)" part xD
|
Quote:
Quote:
|
Quote:
|
so how would i copy and paste wrong i coppied everything andpasted everything
so how would i do it right? |
Quote:
<b>error: unexpected token: * at line 1: * Made by Twinny under Open Source */ You've missed the first / in the script which turns the first line into a comment. After this, the script broke..... Please, read the errors that RC gives and solve the problem from there. You have the entire script in front of you so it should become really clear..... |
| All times are GMT +2. The time now is 11:59 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.