Jump to content

Question

4 answers to this question

Recommended Posts

  • 0
Posted

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;
}

 

  • 0
Posted
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?

  • 0
Posted
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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.