GetPlayerNameEx,SendClientMessageEx etc
#1

How could GetPlayerNameEx, SendClientMessageEx, ProxDetector be on a free gamemode I found without define and function and I can't use them on my new project?+REP to those who help me.
Reply
#2

pawn Код:
stock GetPlayerNameEx(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
Reply
#3

Thanks +REPed but the other things?
Reply
#4

Quote:
Originally Posted by Isolated
Посмотреть сообщение
pawn Код:
stock GetPlayerNameEx(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
If I'm not mistaken a stock function cannot return an array. Am I forgetting something?
Reply
#5

^
No.

I don't start scripting reading wikis.
But all i know. That name is not a array.
name[MAX_NAME]; is a string i guess ?
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
Strings ARE arrays, but stocks can return both.
Yes. As long as the variable has a size (defined between the square brackets in the new statement) it is an array.

new arrayOne[100];

for (new i=0; i<sizeof(arrayOne); i++)
{
arrayOne[i] = rand(10000);
}

That code will give every part of the array (from 0-100) a random value between 0 and 10,000.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)