Help with /houseexit...
#1

Can someone help me... this isn't working it says it worked but it isn't this is from Raven's Roleplay script

Код:
	if(strcmp(cmd, "/houseexit", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] < 5)
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You are not Authorized to use this Command!");
				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 500");
			    return 1;
			}
			else
   			{
	   			if(proplev <= 500)
	      		{
	      			format(string, sizeof(string),"* Teleported the House Exit number %d To you. Use /edit and /setdesc to edit It.",proplev);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				    new Float:X,Float:Y,Float:Z;
				    GetPlayerPos(playerid,X,Y,Z);
				    format(string,sizeof(string),"[ADMIN]: %s Has Moved House: [%d]'s exit to [%f - %f - %f].",sendername,proplev,X,Y,Z);
				    ABroadCast(COLOR_LIGHTRED,string, 5);
					HouseInfo[proplev][hExitx] = X;
					HouseInfo[proplev][hExity] = Y;
					HouseInfo[proplev][hExitz] = Z;
					HouseInfo[proplev][hInt] = GetPlayerInterior(playerid);
					OnPropUpdate();
					new y, m, d;
					new h,mi,s;
					getdate(y,m,d);
					gettime(h,mi,s);
					format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Moved the House: [%d]'s Exit to [%f - %f - %f]",d,m,y,h,mi,s,sendername,proplev,X,Y,Z);
					PlaceLog(string);
					return 1;
				}
				else
				{
				    SendClientMessage(playerid,COLOR_WHITE,"Cannot use Test Houses.");
				    return 1;
				}
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Help with /houseexit... - by CT_Ronnie_Deo - 31.07.2010, 18:44

Forum Jump:


Users browsing this thread: 1 Guest(s)