20.12.2013, 23:22
Has anyone done it?
public Anypublic(playerid) { new string[24]; GetPlayerName(playerid, string, 24); return string, 1; }
// Some FS
new
somestr[8] = "abcd123";
forward GetSomeStr(idx);
public GetSomeStr(idx)
{
return somestr[idx];
}
// GM
new
str[8];
for (new idx = 0; idx != 8; ++ idx)
{
str[idx] = CallRemoteFunction("GetSomeStr", "i", idx);
if (str[idx] == '\0') break;
}
printf("%s", str);
I did and got no errors.
Here's how i've done it (gotta say i kinda borrowed the idea while reading one of ******'s posts) Код:
public Anypublic(playerid) { new string[24]; GetPlayerName(playerid, string, 24); return string, 1; } |
or something like this...?
pawn Код:
|
I did and got no errors.
Here's how i've done it (gotta say i kinda borrowed the idea while reading one of ******'s posts) Код:
public Anypublic(playerid) { new string[24]; GetPlayerName(playerid, string, 24); return string, 1; } |
or something like this...?
pawn Код:
|
stock GetRemoteString(function[], dest[], size)
{
for (new i = 0; (dest[i] = CallRemoteFunction(function, "d", i)) && i < size; i ++) {}
return 1;
}