Sourcemod member authorisation
Hi there,
I have a database with a member table which contains the fields: playername, steamid and ipadress. Is there a script which authorizes joining players by these fields? When they are not authorized they should be kicked out with a kickmessage something like "you're not a member, please register!" Thanks in advance, Joost. |
Re: Sourcemod member authorisation
We're trying it with the following code, but it isn't really responding :|
PHP Code:
|
Re: Sourcemod member authorisation
You defined the function "StartSQL", but you never called it...
The plugin never gets connected to the database. Put it like this: PHP Code:
|
Re: Sourcemod member authorisation
Nice, that resolved one problem with compiling! Thnx man!
Still having 2 errors now.. /home/groups/sourcemod/upload_tmp/phpJaSUZW.sp(69) : warning 203: symbol is never used: "CheckSteamID" /home/groups/sourcemod/upload_tmp/phpJaSUZW.sp(36) : warning 204: symbol is assigned a value that is never used: "hDatabase" What seams to be te problem here? Am i doing something really stupid, or should this work fine in-game? |
Re: Sourcemod member authorisation
You need to use your CheckSteamID function somewhere. I suggest putting it inside of OnClientAuthorized(client), just like you did with the StartSQL function for OnPluginStart.
|
Re: Sourcemod member authorisation
Quote:
Hmmm, could you give me an example? I'm not sure how to do this exactly.. The following code is used at the moment: PHP Code:
/home/groups/sourcemod/upload_tmp/phpxA2sKr.sp(24) : error 092: number of arguments does not match definition /home/groups/sourcemod/upload_tmp/phpxA2sKr.sp(53) : error 017: undefined symbol "hdatabase" /home/groups/sourcemod/upload_tmp/phpxA2sKr.sp(44) : warning 204: symbol is assigned a value that is never used: "hDatabase" 2 Errors. Any suggestions on how to get this script working? Thnx in advance! |
Re: Sourcemod member authorisation
Code:
forward OnClientAuthorized(client, const String:auth[]);http://docs.sourcemod.net/api/ Also, rename "hdatabase" to "hDatabase" in PHP Code:
|
Re: Sourcemod member authorisation
PHP Code:
|
Re: Sourcemod member authorisation
SWEET! :) it's working!!
Big up for mr. bl4nk :up: |
Re: Sourcemod member authorisation
The one that bl4nk posted 2 above you is only for Steam ID
|
| All times are GMT -4. The time now is 21:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.