Jump to content
  • 0

intrebare


CosminZEQ

Question

4 answers to this question

Recommended Posts

  • 0

Reprezintă o cifră de la 0 la 10 , mai sus ai 

if(new i=0;i<10;i++)

Este un Loop care urcă de la 0 la 10 , când ajunge la 10 se oprește. 

Mai exact o sa "cheme" toate funcțiile de 10x ce este inre {} după loop.

De exemplu dacă nu ai acel loop ar fi trebuit să faci (de exemplu) :

if(PlayerInfo[playerid][pCarKey][0])
{ .. }
if(PlayerInfo[playerid][pCarKey][1])
{ .. }
if(PlayerInfo[playerid][pCarKey][2])
{ .. }
if(PlayerInfo[playerid][pCarKey][3])
{ .. }
etc

Acel i este pus în locul cifrelor.

 

Ai aici wiki pentru loop.

  • Upvote 1
public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

  • 0
2 minutes ago, Ph0eniX said:

Reprezintă o cifră de la 0 la 10 , mai sus ai 


if(new i=0;i<10;i++)

Este un Loop care urcă de la 0 la 10 , când ajunge la 10 se oprește. 

Mai exact o sa "cheme" toate funcțiile de 10x ce este inre {} după loop.

De exemplu dacă nu ai acel loop ar fi trebuit să faci (de exemplu) :


if(PlayerInfo[playerid][pCarKey][0])
{ .. }
if(PlayerInfo[playerid][pCarKey][1])
{ .. }
if(PlayerInfo[playerid][pCarKey][2])
{ .. }
if(PlayerInfo[playerid][pCarKey][3])
{ .. }
etc

Acel i este pus în locul cifrelor.

 

Ai aici wiki pentru loop.

Ahaa, și gen ia până doar la al 10 lea slot?

Link to comment
Share on other sites

  • 0
Chiar acum, CosminZEQ a spus:

Ahaa, și gen ia până doar la al 10 lea slot?

Da, sau numarul maxim setat de tine.

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.