25.12.2009, 21:49
pawn Код:
public SendAllFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
isStringSame(const string1[], const string2[], len) {
for(new i = 0; i < len; i++) {
if(string1[i]!=string2[i])
return 0;
if(string1[i] == 0 || string1[i] == '\n')
return 1;
}
return 1;
}
pawn Код:
public SendAllFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}
isStringSame(const string1[], const string2[], len) {
for(new i = 0; i < len; i++) {
if(string1[i]!=string2[i])
return 0;
if(string1[i] == 0 || string1[i] == '\n')
return 1;
}
return 1;
}

