Jump to content

Deschidere poarta.


Anxiety

Recommended Posts

Problema intalnita (descriere): Cum fac sa se deschida poarta doar de catre un anumit player? De exemplu vreau ca doar player-ul cu numele "Razvan" sa poata deschida/inchida poarta.
Ero(area / rile) / warning-(ul / urile): /
Liniile de cod / sursa / script-ul(obligatoriu): /
Imagini / Video (optional): /
Ati incercat sa rezolvati singur?: Da

Edited by Anxiety
Link to comment
Share on other sites

10 hours ago, Gireada said:

La comanda ta adaugi 


new Nume[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nume);
if(strcmp(nume, "Razvan", false) return SendClientMessage(playerid, -1, "Nu esti razvan");

 

GetPlayerName(playerid, Nume,sizeof(Nume));

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

	if(strcmp(cmdtext,"/oph", true) == 0)
	{
        new Nume[MAX_PLAYER_NAME];
		GetPlayerName(playerid, Nume,sizeof(Nume));
		if(strcmp(nume, "Razvan.", false))
		{
			return;
			SendClientMessage(playerid, -1, "Nu esti razvan");
		}
		else
		{
		MoveObject(aGate, 327.377502,-1183.347534,76.313323,5);
 		SendClientMessage(playerid, COLOR_YELLOW, "Poarta a fost deschisa.");
 		return ;
		}
	}

E bine?

Edited by Anxiety
Link to comment
Share on other sites

47 minutes ago, Anxiety said:

if(strcmp(cmdtext,"/oph", true) == 0) { new Nume[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nume,sizeof(Nume)); if(strcmp(nume, "Razvan.", false)) { return; SendClientMessage(playerid, -1, "Nu esti razvan"); } else { MoveObject(aGate, 327.377502,-1183.347534,76.313323,5); SendClientMessage(playerid, COLOR_YELLOW, "Poarta a fost deschisa."); return ; } }

 

	if(strcmp(cmdtext,"/oph", true) == 0)
	{
        new Nume[MAX_PLAYER_NAME];
		GetPlayerName(playerid, Nume,sizeof(Nume));
		if(strcmp(nume, "Razvan.", false))	return	SendClientMessage(playerid, -1, "Nu esti razvan");
		
		
		MoveObject(aGate, 327.377502,-1183.347534,76.313323,5);
 		SendClientMessage(playerid, COLOR_YELLOW, "Poarta a fost deschisa.");
 		return 1;
		
	}

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.