new varTest;
CMD:test(playerid)
{
new result[128];
varTest ++;
format(result, sizeof(result), "%d", varTest);
SendClientMessageToAll(-1, result);
return 1;
}
new valor[15] = "";
new qt;
CMD:teste()
{
new str[10];
qt++;
format(str, sizeof str, "%d", qt);
strcat(valor, str);
SendClientMessageToAll(-1, str);
return valor;
}
Leia isso: https://sampwiki.blast.hk/wiki/Strcat
eu fiz isto pelo celular... PHP код:
|
return valor;
#include <a_samp>
main() {}
public OnGameModeInit()
{
for(new i = 0; i < 10; i++)
{
static
Var[30] = 1;
strins(Var, "1", 0);
printf("%d", strval(Var));
}
return true;
}
[20:59:59] 1
[20:59:59] 11
[20:59:59] 111
[20:59:59] 1111
[20:59:59] 11111
[20:59:59] 111111
[20:59:59] 1111111
[20:59:59] 11111111
[20:59:59] 111111111
[20:59:59] 1111111111
new varTest[30];
CMD:test(playerid)
{
new result[128];
strins(varTest, "1", 0);
format(result, sizeof(result), "%d", strval(varTest));
SendClientMessageToAll(-1, result);
return 1;
}