Author Topic: Need Help In <!> to </c>  (Read 2675 times)

0 Members and 1 Guest are viewing this topic.

Offline (VEK)Prince

  • Street Thug
  • *
  • Posts: 10
  • PWN Scripter XC Developer
    • View Profile
Need Help In <!> to </c>
« on: December 27, 2011, 10:49:11 am »
Hi Guys i wanna know that how can we do this ! to /c i tried alot but it did'nt work i give you this

Example I have this
[pawn]}
   else if (strcmp(cmd, "setnews", true) == 0) {
      new szMsg[256], setnews[256];
      tmp = strtok(cmdtext, idx);
      if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setnews text");
      else {
         format(file, sizeof(file), "/News/News.ini", "News");
            format(setnews,sizeof(setnews),"By [%s]> %s ",gPlayers[playerid],cmdtext[7]);
         dini_Set(file, "News", setnews);
            SetTimer("SetTimer",2000);
      }
      return 1;[/pawn]

but it did'nt work through as it looks anyone can tell me that how to correct this when i type /c setnews so it says "Error:Unknown Command" need help!

Offline SaFeeR

  • Street Thug
  • *
  • Posts: 37
  • Pawno Scripter
    • View Profile
    • PaK-ServeR Website
Re: Need Help In <!> to </c>
« Reply #1 on: December 27, 2011, 10:56:26 am »
its so simply
[pawn]
   else if (strcmp(cmd, "setnews", true) == 0) {
      new szMsg[256], setnews[256];
      tmp = strtok(cmdtext, idx);
      if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setnews text");
      else {
         format(file, sizeof(file), "/News/News.ini", "News");
            format(setnews,sizeof(setnews),"By [%s]> %s ",gPlayers[playerid],cmdtext[7]);
         dini_Set(file, "News", setnews);
            SetTimer("SetTimer",2000);
      }
      return 1;
}[/pawn]
paste this
uper on gmx
If You Like My Scripting Like My Page


Offline (VEK)Prince

  • Street Thug
  • *
  • Posts: 10
  • PWN Scripter XC Developer
    • View Profile
Re: Need Help In <!> to </c>
« Reply #2 on: December 27, 2011, 11:40:19 am »
thanks Safeer it works

Offline SaFeeR

  • Street Thug
  • *
  • Posts: 37
  • Pawno Scripter
    • View Profile
    • PaK-ServeR Website
Re: Need Help In <!> to </c>
« Reply #3 on: December 27, 2011, 01:22:59 pm »
its ok :)
If You Like My Scripting Like My Page