Scripting Basics: Difference between revisions

From San Andreas Multiplayer
Jump to navigationJump to search
No edit summary
Tag: Reverted
No edit summary
Tags: Manual revert Reverted
Line 1: Line 1:
<pre>
== Scripting Basics ==
{{Replace {{{code|}}}
 
  | {{#replace: {{{code}}}
{{PawnCode|code=
      | old=public
public OnPlayerConnect(playerid) {
      | new=<span class="pawn-keyword">public</span>
    new string[128];
      | old=private
    format(string, sizeof(string), "Willkommen, Spieler %d!", playerid);
      | new=<span class="pawn-keyword">private</span>
     SendClientMessage(playerid, 0xFFFFFFFF, string);
      | old=if
}
      | new=<span class="pawn-keyword">if</span>
      | old=else
      | new=<span class="pawn-keyword">else</span>
      | old=for
      | new=<span class="pawn-keyword">for</span>
      | old=while
      | new=<span class="pawn-keyword">while</span>
      | old=return
      | new=<span class="pawn-keyword">return</span>
      | old="//"
      | new=<span class="pawn-comment">//</span>
      | old="\"(.*?)\""
      | new=<span class="pawn-string">"$1"</span>
      | old="\w+\s*\(.*?\)"
      | new=<span class="pawn-function">$0</span>
     }}
  | Keine Code-Angabe gefunden.
}}
}}
</pre>

Revision as of 18:51, 2 November 2024

Scripting Basics

{{If {{{code|}}}
  | {{#replace: {{{code}}}
      | old=public
      | new=<span class="pawn-keyword">public</span>
      | old=private
      | new=<span class="pawn-keyword">private</span>
      | old=if
      | new=<span class="pawn-keyword">if</span>
      | old=else
      | new=<span class="pawn-keyword">else</span>
      | old=for
      | new=<span class="pawn-keyword">for</span>
      | old=while
      | new=<span class="pawn-keyword">while</span>
      | old=return
      | new=<span class="pawn-keyword">return</span>
      | old="//"
      | new=<span class="pawn-comment">//</span>
      | old="\"(.*?)\""
      | new=<span class="pawn-string">"$1"</span>
      | old="\w+\s*\(.*?\)"
      | new=<span class="pawn-function">$0</span>
    }}
  | Keine Code-Angabe gefunden.
}}