Help || Dialog Command
#1

Someone can make the commands to dialog?
PLEASE

Код:
	if(strcmp(cmd, "/houseentrance", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] != 1337 && PlayerInfo[playerid][pAdmin] != 1338)
			{
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			    SendClientMessage(playerid, COLOR_GRAD2, "SYNTAX: /houseentrance [houseid] - Moves a house to you");
				return 1;
			}
			new proplev = strval(tmp);
			if(proplev > sizeof(HouseInfo) || proplev < 0)
			{
			    SendClientMessage(playerid,COLOR_WHITE,"House ID must be above 0 and below 886");
			    return 1;
			}
			else
   			{
			    new Float:X,Float:Y,Float:Z;
			    GetPlayerPos(playerid,X,Y,Z);
			    format(string,sizeof(string),"Entrance of House %d to %f - %f - %f",proplev,X,Y,Z);
       			ABroadCast(COLOR_YELLOW,string,5);
				HouseInfo[proplev][hEntrancex] = X;
				HouseInfo[proplev][hEntrancey] = Y;
				HouseInfo[proplev][hEntrancez] = Z;
				//OnPropUpdate(); //added auto save system
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "%s has moved house %d !", sendername, proplev);
				EditLog(string);
				return 1;
			}
		}
	}
	if(strcmp(cmd, "/houseexit", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] != 1337 && PlayerInfo[playerid][pAdmin] != 1338)
			{
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			    SendClientMessage(playerid, COLOR_GRAD2, "SYNTAX: /houseexit [houseid] - Moves a house to you");
				return 1;
			}
			new proplev = strval(tmp);
			if(proplev > sizeof(HouseInfo) || proplev < 0)
			{
			    SendClientMessage(playerid,COLOR_WHITE,"House ID must be above 0 and below 33");
			    return 1;
			}
			else
   			{
			    new Float:X,Float:Y,Float:Z;
			    GetPlayerPos(playerid,X,Y,Z);
			    format(string,sizeof(string),"Exit of House %d to %f - %f - %f",proplev,X,Y,Z);
       			ABroadCast(COLOR_YELLOW,string,5);
				HouseInfo[proplev][hExitx] = X;
				HouseInfo[proplev][hExity] = Y;
				HouseInfo[proplev][hExitz] = Z;
				HouseInfo[proplev][hInt] = GetPlayerInterior(playerid);
				//OnPropUpdate(); //added auto save system
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "%s has moved house %d exit !", sendername, proplev);
				EditLog(string);
				return 1;
			}
		}
		return 1;
	}
Reply
#2

Quote:
Originally Posted by Yahav
Посмотреть сообщение
Someone can make the commands to dialog?
Be a bit more detailed and you can post your requests here: https://sampforum.blast.hk/showthread.php?tid=30938&page=163
Reply
#3

Okay
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)