Da li mi netko moze objasniti?

Započeo Mr. Kid, Novembar 11, 2009, 19:49:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pozz!

Moze li mi netko objasniti ove dvije komande?

if (strcmp(cmdtext, "/lock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, COLOR_GREEN,"You can only lock the doors as the driver.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
new Float:X,Float:Y,Float:Z;
SendClientMessage(playerid, COLOR_GREEN, "Vehicle locked!");
GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1056,X,Y,Z);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "You're not in a vehicle!");
}
    return 1;
}

    if (strcmp(cmdtext, "/unlock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, COLOR_GREEN,"You can only unlock the doors as the driver.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
new Float:X,Float:Y,Float:Z;
SendClientMessage(playerid, COLOR_GREEN, "Vehicle unlocked!");
GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1057,X,Y,Z);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "You're not in a vehicle!");
}
    return 1;
}
}
Poslednja Izmena: Novembar 11, 2009, 19:57:45 POSLE PODNE od Mr. Kid

sta ti treba objasniti ?


to ti je kad si vozac onda mozes zakljucat vrata i odkljucat

======ஜ۩۞۩ஜ======
â—,,███â–"â–' FucK oFFâ–'â–"███►
======ஜ۩۞۩ஜ======



:D Fala kurcu imamo i nekih pametnih ljudi na forumu :D

Posjetite:
TUTORIALS 4 ALL NA HRVATSKOM









To znam, nego sto znaci ovo for(i=0;i<MAX_PLAYERS;i++)

Citat: Mr. Kid poslato Novembar 11, 2009, 20:54:55 POSLE PODNE
To znam, nego sto znaci ovo for(i=0;i<MAX_PLAYERS;i++)
evo vamo imas na hrvatskom objasnjeno.
http://www.tutorijali.net/cpp/for-naredba

[NUDIM ]
Gang-Rush server TDM besplatno