Re: Useful Function Thread (Frequently updated)
[quote author=Phoenix link=topic=33.msg3170#msg3170 date=1317638129]
[quote author=Lorenc link=topic=33.msg129#msg129 date=1309070914]
Code :
#if !defined MAX_PLAYER_NAME
#define MAX_PLAYER_NAME 24 // 24 Characters, I don't know the limit yet...
#endif
stock ReturnPlayerName(clientid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(clientid, name);
return name;
}
[/quote]
Would be better so store it in a global variable and check the name while connecting
[/quote]
That function hasn't been updated in days!
Code :
#if !defined MAX_PLAYER_NAME
#define MAX_PLAYER_NAME 24 // 24 Characters, I don't know the limit yet...
#endif
new name{MAX_PLAYER_NAME};
stock ReturnPlayerName(clientid)
{
GetPlayerName(clientid, name);
return name;
}
Uses packed strings however, my laziness bumps me out of my I'm going to update the thread :/
Post your functions in the thread as well ;D
Re: Useful Function Thread (Frequently updated)
Re: Useful Function Thread (Frequently updated)
[quote author=Recycler link=topic=33.msg3184#msg3184 date=1317662330]
GetPlayerName is now
https://wiki.vaultmp.com/index.php/GetName
MAX_PLAYER_NAME is
https://wiki.vaultmp.com/index.php/MAX_PLAYER_NAME
:D
[/quote]
Yay! Can you soon bring some functions that set a certain index?
Like for example:
SetPlayerPos(playerid, Float: X, Float: Y, Float: Z);