How to use cs_get_user_team() and what is the name of a player entity?(ALMOST SOLVED)
1. How can I use the cs_get_user_team() function?(SOLVED)
I have tried doing the following: PHP Code:
Code:
Warning: Tag mismatch on line 10802. What is the name of the player entitiy?(SOLVED) For example, if I wanna use the FM_SetModel() function, that its parameters are: Code:
FM_SetModel(ent, const szModel[])3. I am working on a basic plugin, and there are WAY too many lines in it for a plugin that does something that basic (setting up player's health, money and armor) and I just wanted to know the ways to make less lines and save memory... and causing less laggs... etc. Thanks alot for any helpers!:up: (+karma of course) |
Re: How to set up a player's model and how is the player entity called?
ent is the index of an entity , a player is an entity , so the players index number would be used .
|
Re: How to set up a player's model and how is the player entity called?
Quote:
|
Re: How to use cs_get_user_team() and what is the name of a player entity?
the 2nd paramater of get_user_team is a string
Code:
|
Re: How to use cs_get_user_team() and what is the name of a player entity?
Quote:
PHP Code:
Problem SOLVED but, I will let you know if there are any problems, so be ready to help me if I need, ok? :D |
Re: How to use cs_get_user_team() and what is the name of a player entity?
lol np . K:mrgreen:
|
Re: How to use cs_get_user_team() and what is the name of a player entity?
cs_get_user_team returns as "CsTeams", so declare the variable like "new CsTeams:Team". Then you have to set or check it using CS_TEAM_T, CS_TEAM_CT, etcetera. Or, you could use a regular variable, and convert the return result into an int: "new Team = _:cs_get_user_team(player)"
Peoples Army: The second argument to get_user_team is optional, it lets you get the team name (in addition to get_user_team returning the team number). |
Re: How to use cs_get_user_team() and what is the name of a player entity?
oh thats right , i just saw him using the 2nd paramater so i figured id tell him how to use it right
|
Re: How to use cs_get_user_team() and what is the name of a player entity?
Or the fakemeta way...
new team = pev(id, pev_team) |
Re: How to use cs_get_user_team() and what is the name of a player entity?
Quote:
And besides, I wanted it to return the team's NAME not NUMBER. So I did needed to use the second argument? And where do I need to put Team after i did new CsTeams:Team in the get_user_team function? by the way, to set its team, do i need to do this: new CsTeams:Team = CS_TEAM...? Peoples Army: Thanks for the karma:D Vet: I think i'll use that just incase issues might pop up using the fun/cstrike module... +karma :) |
| All times are GMT -4. The time now is 05:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.