<RetVar/IF> player has police licence for race <Var/Race>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25128
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar/IF> player has police licence for race <Var/Race>

Post by X2-Illuminatus »

[skip|else] if [not]|while [not]| <RetVar/IF> player has police licence for race <Var/Race>


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Use a variable, if the command should return information. If a variable is used, it will contain '1' if the player has a police licence for that race or '0' if not.
<Var/Race> = A race or variable containing it.


This checks, if the player has a police licence for the as <Var/Race> selected race. If he has one, the command will return '1', if not '0'.


Example:

$size= size of array $races.arr
while $size
|dec $size=
|$race=$races.arr[$size]
|if player has police license for race $race
||player loses police licence for race $race
|end
end
return null

Assuming the array $races.arr contains races, this will remove the police licences for that races from the player inventory.


Related Commands:

player loses police licence for race <Var/Race>


Command Location:
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25128
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 304921

Post by X2-Illuminatus »

[skip|else] if [not]|while [not]| <RetVar/IF> player has police licence for race <Var/Race>


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Nutze eine Variable, wenn der Befehl eine Information zurückgeben soll. Wenn eine Variable genutzt wird, wird er '1' enthalten, wenn der Spieler eine Polizeilizenz für das gewählte Vol besitzt und '0' wenn nicht.
<Var/Race> = Ein Volk oder eine Variable, die eins enthält.


Dies überprüft, ob der Spieler eine Polizeilizenz von dem als <Var/Race> gewählten Volk besitzt. Wenn er eine besitzt, wird '1', wenn nicht '0' zurückgegeben.


Beispiel:

$size= size of array $races.arr
while $size
|dec $size=
|$race=$races.arr[$size]
|if player has police license for race $race
||player loses police licence for race $race
|end
end
return null

Vorausgesetzt das Array $races.arr enthält Völker, wird dieses Beispiel die Polizeilizenzen dieser Völker vom Spielerinventar entfernen.


Verwandte Befehle:

player loses police licence for race <Var/Race>


Zu finden unter:

Return to “MSCI Reference”