Anonymous
public text v1 · immutable if (strcmp(cmd, "/hi", true, 0) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if (!strlen(tmp))
{
SendClientMessage(playerid, red, "**USAGE: /hi <id>");
return 1;
}
new pname[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
GetPlayerName(giveplayerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s says hi to %s");
SendClientMessageToAll(yellow, string);
return 1;
}