Stupid question
#1

Well this is a pretty easy question say you wanna do

Something like this
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  new cmd[30];
  new idx;
  cmd = strtok(cmdtext, idx);
 
  if(strcmp(cmd, "/sayhello", true) == 0)
  {
    new tmp[30];
    // assign the id (written by the user) to tmp
    tmp = strtok(cmdtext, idx);
 
    // convert the id to an integer using strval (this is essential)
    // and assign to otherplayer
    new otherplayer = strval(tmp);
 
    if(IsPlayerConnected(otherplayer))
    {
      SendClientMessage(otherplayer, 0xFFFF00AA, "Hi, hello!");
    }
    return 1;
  }
  return 0;
}
But if you wanted to do ban

It would be like this if I am correct, (leeway, im a new)
Actually, Haha I dont understand really how to attack this, because I dont know what idx is hmm someone could explain or tutor me, that would be good, I understand concepts of C++, and read the tutorial of this but this seem confusing maby because there is stuff I never used before

Reply


Messages In This Thread
Stupid question - by typedef - 11.05.2009, 01:50
Re: Stupid question - by CJ101 - 11.05.2009, 02:01
Re: Stupid question - by typedef - 11.05.2009, 02:25

Forum Jump:


Users browsing this thread: 1 Guest(s)