11.05.2009, 01:50
Well this is a pretty easy question say you wanna do
Something like this
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
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; }
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