Jump to content
  • 0

Is Player GMember


Mihaela

Question

Nick: MihaelaRo

Problema: Deci , atuncea cand dau sa selecteze numele gangului nu il selecteaza ... nu inteleg dece.

Erori / warnings: -

Lini/script: Comanda :

CMD:og(playerid, params[])
{
    if(IsPlayerGangMember(playerid, Gang1))
    {
		if(IsPlayerInRangeOfPoint(playerid, 10,2104.3799, 28.2700, 3.8400))
		{
	        MoveObject(Gate[0],2104.3799, 28.2700, 11.3244,5);
	        GameTextForPlayer(playerid, "~n~~r~Gate is~n~~y~Opening", 3000,6);
	        return 1;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 10,1962.3900, -88.6300, 4.8100))
		{
		    MoveObject(Gate[1],1962.3900, -88.6300, 12.2104,5);
		    GameTextForPlayer(playerid, "~n~~r~Gate is~n~~y~Opening", 3000,6);
		    return 1;
		}
	}
	return 1;
}
stock :
stock IsPlayerGangMember(playerid, gang_name[])
{
	new player_name[MAX_PLAYER_NAME], GQuery[100];
	GetPlayerName(playerid,player_name,sizeof(player_name));
	format(GQuery, sizeof(GQuery), "SELECT `gangname` FROM `gmembers` WHERE `playername` = '%s' AND `gangname` = '%s'", player_name, gang_name);
 	Result = db_query( Database, GQuery );
	new rows = db_num_rows( Result );
	db_free_result(Result);
	if(!rows) return 0;
	else return ( 1 );
}
#define Gang1                                                   "Thug Life"

Ai incercat sa rezolvi singur ?: Da

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Salut Mihaela,tu ai pus o comanda prin care un player(care este intr-un gang) sa deschida poarta.Nu se selecteaza probabil pentru ca nu ai continuat dialogurile in OnDialogResponse.

 

 

Link to comment
Share on other sites

Salut Mihaela,tu ai pus o comanda prin care un player(care este intr-un gang) sa deschida poarta.Nu se selecteaza probabil pentru ca nu ai continuat dialogurile in OnDialogResponse.

Salut Adrian , din cate vezi este doar o comanda si un stock ar trebui sa functioneze corect , eu unu' nu vad nici-o problema nu inteleg dece nu functioneaza

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

 

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.