SA-MP Forums Archive
can someone... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: can someone... (/showthread.php?tid=89868)



can someone... - nuriel8833 - 04.08.2009

make me that dcmd code to a pawn code?:
pawn Код:
dcmd_killmsg(playerid,params[])
{
if((!strcmp(params,"1",true)) || (!strcmp(params,"\"1\"",true))) {
    for(new i=0;i<MAX_PLAYERS;i++) {
    if(IsPlayerConnected(i)){
    GivePlayerMoney(i,10000);
    }
    }
return 1;
}

if((!strcmp(params,"2",true)) || (!strcmp(params,"\"2\"",true))) {
    for(new i=0;i<MAX_PLAYERS;i++) {
    if(IsPlayerConnected(i)){
    GivePlayerMoney(i,100000);
    }
    }
return 1;
}

if((!strcmp(params,"3",true)) || (!strcmp(params,"\"3\"",true))) {
    for(new i=0;i<MAX_PLAYERS;i++) {
    if(IsPlayerConnected(i)){
    GivePlayerMoney(i,1000000);
    }
    }
return 1;
}
return 1;
}



Re: can someone... - MenaceX^ - 04.08.2009

It's already a pawn code?


Re: can someone... - [LL]InstabiC - 04.08.2009

Quote:
Originally Posted by MenaceX^
It's already a pawn code?
He doesn't want it in dcmd, this is like his 3rd - 4th topic on this.


Re: can someone... - MenaceX^ - 04.08.2009

pawn Код:
if(!strcmp(cmdtext,"/killmsg",true))
{
  new cmd[128];
  cmd=strtok(cmdtext,idx);
  if(!strlen(cmd)) return SendClientMessage(playerid,color,"/killmsg [1/2/3]");
  if(strval(cmd))
  {
    for(new i=0;i<MAX_PLAYERS;i++)
    {
      if(!IsPlayerConnected(i)) continue;
      GiveMoney(i,1000);
    }
  }
  if(strval(cmd)==2)
  {
    for(new i=0;i<MAX_PLAYERS;i++)
    {
      if(!IsPlayerConnected(i)) continue;
      GiveMoney(i,10000);
    }
  }
  if(strval(cmd)==3)
  {
    for(new i=0;i<MAX_PLAYERS;i++)
    {
      if(!IsPlayerConnected(i)) continue;
      GiveMoney(i,10000);
    }
  }
  return 1;
}



Re: can someone... - speedruntrainer - 04.08.2009

I don't know thing about dcmd but why you have 2 return 1; at the end of the code?


Re: can someone... - nuriel8833 - 05.08.2009

Quote:
Originally Posted by speedruntrainer
I don't know thing about dcmd but why you have 2 return 1; at the end of the code?
I dont know maybe its the public return

Quote:
Originally Posted by InstabiC
Quote:
Originally Posted by MenaceX^
It's already a pawn code?
He doesn't want it in dcmd, this is like his 3rd - 4th topic on this.
what can i do my topic about that is lock
and its only my 2nd topic