SA-MP Forums Archive
Need a little help with scripting something. - 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: Need a little help with scripting something. (/showthread.php?tid=66099)



Need a little help with scripting something. - Ed2ka49 - 19.02.2009

Alright, So I want to script that after the player use a command (for example - "/ABAB"), In the script of this command it will make him to use automatically "/ACACAC".

I will try to explane: After I type command number 1, I want me to automatically type command number 2.

Do you know how to do that?

Thanks.


Re: Need a little help with scripting something. - Ed2ka49 - 19.02.2009

Anyone please?


Re: Need a little help with scripting something. - yom - 19.02.2009

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (!strcmp(cmdtext, "/abab", true, 5))
  {
    //this will call command "/acacac" in every pawn scripts of the server.
    CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/acacac");

    //if command "/acacac" is in same script than command "/abab", it's better to do just that.
    //OnPlayerCommandText(playerid, "/acacac");
   
    return true;
  }

  return false;
}




Re: Need a little help with scripting something. - Ed2ka49 - 19.02.2009

Thanks dude, you really helped me