Help with file-read
Hello there,
i'm a new little coder and want to recode a plugin. Its this: Hats I tried to give every player a hat when he spawn first time on map. Originalfunction of Hats: PHP Code:
How i had to modify the command, which i send to client @ first spawn? PHP Code:
Please. Greets, Grinf4ce |
Re: Help: A question to a clientcommand
Code:
client_cmd(id,"amx_givehat %s %s",nick,model) |
Re: Help: A question to a clientcommand
PHP Code:
This will work better, as if you use id, you probably won't get the right person or a person at all |
Re: Help: A question to a clientcommand
Thank you YamiKoitou!
Works :-D But Now the Bots havent a hat, when they join the server. :-/ Is the get_user_userid(id) only for humanplayer or havent bots the "first spawn" event? |
Re: Help: A question to a clientcommand
If the bots are not getting a hat, I would look at the hats plugin. It may be blocking it if it is trying to give one to a bot
|
Re: Help: A question to a clientcommand
If you are hooking ResetHUD then no, bots don't have a spawn event.
Use register_forward(FM_Spawn,...) (FakeMeta) or RegisterHam(Ham_Spawn,"player",...) (HamSandwich) |
Re: Help: A question to a clientcommand
Quote:
|
Re: Help: A question to a clientcommand
Well I just played around with this:
Code:
And it only logged anything when I called sv_restartound (When I called it, not when the round restarted - call sv_restartround 10 and it's obvious when it occurs) |
Re: Help: A question to a clientcommand
Okay now it works.
But i have again a little noob question. I wrote an addon which write the steamid in a file. Now i want to read it out, and search for the steamid, which you use. If the script found your id, you cant pick up the gift, else you can pickup the gift. PHP Code:
Oh man my bad english, i hope someone understand what i mean *g* |
| All times are GMT -4. The time now is 11:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.