need help with function
#1

well, I need to make a genelar function but I don't know how to do it.
pawn Код:
enum pInfo
{
      pShit,pSux
};
new ShitInfo[MAX_PLAYERS][pInfo];

stock GetPlayerInfoEx(playerid,str[])
{
      return ShitInfo[playerid][str];
}
like this, trhough script I need to use it. Any idea how to make it in real?
Reply
#2

#define GetPlayerInfo(%0,%1) pInfo[%0][%1]

should do it.

But isn't easier to just do the

pInfo[playerid][...]

?
Reply
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
#define GetPlayerInfo(%0,%1) pInfo[%0][%1]

should do it.

But isn't easier to just do the

pInfo[playerid][...]

?
I want to make and function GivePlayerInfo because I getting boring by typing
PlayerInfo[playerid][pShit]=PlayerInfo.... also I want to put some message and song, better to use a function
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)