// /asay parancs
#include < a_samp >
#define VILAGOSKEK (0x33CCFFAA)
#define SARGA (0xF5DEB3AA)
#define FEHER (0xFFFFFFAA)
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, \"/asay\", true) == 0)
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= \' \'))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, SARGA, \"HASZNÁLAT: /asay [szöveg]\");
return 1;
}
if(IsPlayerAdmin(playerid))
{
new string[128];
format(string, sizeof(string), \"Admin: %s\", result);
SendClientMessageToAll(VILAGOSKEK, string);
}
else
{
SendClientMessage(playerid, FEHER, \"Csak RCON adminok használhatják ezt a parancsot!\");
}
return 1;
}
return 0;
}
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;
}
INNEN IS LETÖLTHETED....Szerintem ez jó lesz neked. Zárom a témát.