laptop script, incorporated to my script. result: can't compile to an amx file..
#1

here are the parts of code i added to my script

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new RandomMSG[][] =
	{
  "Welcome to hornybaby.com, are you over 18? ((here's a virus))",
  "The internet is for porn, the internet is for porn! porn! porn!",
  "Mud...kip...Mud...kip...Mud...kip",
  "*yellings* OH YEEEA, HARDER! HARDER!",
  "You Got Rick Roll'd!"
	};
  if(dialogid == 1)
  {
    if(!response) SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!");
    new message[196];
    format(message, sizeof(message), "Firefox - Loading %s........", inputtext);
    SendClientMessage(playerid, 0xFFFFFFFF, message);
    new randMSG = random(sizeof(RandomMSG));
		SendClientMessage(playerid, 0xFFFFFFFF, RandomMSG[randMSG]);
    PlayerInfo[playerid][pVirus] = 1;
    return 1;
  }
  return 0;
}

public LapUsersMssg(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if PlayerInfo[playerid][pLaptop] >1)
			{
			  SendClientMessage(i, color, string);
			  PlayerPlaySound(i,1085,0.0,0.0,0.0);
			}
			else
			{
			return 1;
			}
		}
	}
	return 1;
}


// LAPTOP SYSTEM COMMANDS---------------------------------------------------------------
	if(strcmp(cmd, "/lad", true) == 0 || strcmp(cmd, "/ladvertise", true) == 0)
		{
      if PlayerInfo[playerid][pVirus] != 0
			{
  		SendClientMessage(playerid, 0xFFFFFFFF, "Your Computer is Infected With Win32:Vitro!");
  		return 0;
			}
			if PlayerInfo[playerid][pLaptop] >= 1
			{
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, 0xDEEE20FF, "USAGE: /[lad]vertise [TEXT]");
				return 1;
			}
			new pNames[MAX_PLAYER_NAME];
  		GetPlayerName(playerid, pNames, sizeof(pNames));
			format(string,sizeof(string), "[Popup by %s]: %s",pNames, result);
			LapUsersMssg(0xDEEE20FF, result);
		 	new types[56];
		 	format(types, sizeof(types), "%s types on his laptop", name);
		 	ProxDetector(20.0, playerid, types, 0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF);
			}
		 }
		 else
		 {
		  SendClientMessage(playerid, 0xFFFFFFFF, "You are not the owner of a Laptop!");
  		return 1;
		 }
   	}
	if(strcmp("/msn", cmd, true) == 0)
	{
	
		tmp = strtok(cmdtext,idx);

		if(!strlen(tmp) || strlen(tmp) > 5) {
			SendClientMessage(playerid,0xDEEE20FF,"/msn (id) (message)");
			return 1;
		}

		new id = strval(tmp);
    gMessage = strrest(cmdtext,idx);

		if(!strlen(gMessage)) {
			SendClientMessage(playerid,0xDEEE20FF,"/msn (id) (message)");
			return 1;
		}
		if(playerid != id)
		{
      if PlayerInfo[playerid][pLaptop] >= 1
			{
				GetPlayerName(id,iName,sizeof(iName));
				GetPlayerName(playerid,pName,sizeof(pName));
				format(Message,sizeof(Message),"[Incoming] %s(%d): %s",iName,id,gMessage);
				SendClientMessage(playerid,0xDEEE20FF,Message);
				format(Message,sizeof(Message),"[Message sent] %s(%d): %s",pName,playerid,gMessage);
				SendClientMessage(id,0xDEEE20FF,Message);
			}
			else
			{
			return 1;
			}
		}
		else
		{
			GetPlayerName(id,iName,sizeof(iName));
			GetPlayerName(playerid,pName,sizeof(pName));
			format(Message,sizeof(Message),"[Incoming] %s(%d): %s",iName,id,gMessage);
			SendClientMessage(playerid,0xDEEE20FF,Message);
			format(Message,sizeof(Message),"[Message sent] %s(%d): %s",pName,playerid,gMessage);
			SendClientMessage(id,0xDEEE20FF,Message);
		}
		return 1;
	}
	if (strcmp(cmd, "/laptophelp", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: :: Commands :: - /about, /buylaptop, /selllaptop, /email, /chatroom");
   		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: :: Commands :: - /leaveroom, /[lad]vertise, /internet, /buyantivirus");
   		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: :: Commands :: - /runCD");
	    return 1;
		}
	}
	if (strcmp(cmd, "/internet", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
      if PlayerInfo[playerid][pVirus] != 0
			{
  		SendClientMessage(playerid, 0xFFFFFFFF, "Your Computer is Infected With Win32:Vitro!");
  		return 0;
			}
      if PlayerInfo[playerid][pLaptop] >= 1
			{
  				new s[128];
			  new loginname[MAX_PLAYER_NAME];
			  GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
			  format(s,sizeof(s),"Welcome %s to Firefox\nPowered by Mozilla\nInternet Explorer is trash\nThats why you downloaded\nThis Browser!",loginname);
			  ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Type in Your Web Address",s,"Go","Cancel");
			}
			else
			{
	  		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Don't Have a Laptop!");
	  		return 1;
			}
		}
	}
	if (strcmp(cmd, "/runCD", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
			if PlayerInfo[playerid][pVirus] != 0 && if PlayerInfo[playerid][pAntivirus] == 1
			{
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Running CD......");
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Avast Anti-Virus Loaded..");
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Removing Virus!");
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Removal Complete!");
			  PlayerInfo[playerid][pVirus] = 0;
			}
			else
			{
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: you dont have avast!");
			  return 1;
			}
		}
	}
	if (strcmp(cmd, "/leaveroom", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
			if PlayerInfo[playerid][pLaptop] >= 1
			{
			  format(string, sizeof(string), "%s Has Left the Chatroom!", name );
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You left the chat room to rejoin type /chatroom");
        LapUsersMssg(0xDEEE20FF, string);
        InChat[playerid] = 0;
			}
			else
			{
	  		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Don't Have a Laptop!");
			}
		}
	}
	if (strcmp(cmd, "/chatroom", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
			if PlayerInfo[playerid][pLaptop] >= 1
			{
			  format(string, sizeof(string), "%s Has Joined the Chatroom!", name );
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Press F6 (or t) To Type A Message To The ChatRoom!");
        LapUsersMssg(0xDEEE20FF, string);
        InChat[playerid] = 1;
			}
			else
			{
	  		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Don't Have a Laptop!");
			}
	  }
	}
	if (strcmp(cmd, "/about", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Laptop System Created By Comptons_Eazy_E");
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Modified and Edited by Nikoo and Joemomma53");
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: If you need help about the laptop system use /laptophelp");
		}
	}
	if (strcmp(cmd, "/buyantivirus", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(GetPlayerMoney(playerid) >= 3500)
	    {
	      if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
				{
					if PlayerInfo[playerid][pLaptop] >= 1;
					{
				  GivePlayerMoney(playerid, -5500);
					PlayerInfo[playerid][pAntivirus] = 1;
	      	SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Bought A Anti-Virus[AVAST] ((/runcd))");
	      	}
	      	else
	      	{
	      	SendClientMessage(playerid, 0xDEEE20FF, "You need a laptop first, smartass");
					}
				}
				else
	      {
	        SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You're not at a 24-7");
				}
      }
	    else
	    {
	      SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You need 3500$ to buy antivirus");
	    }
		}
	}
	if (strcmp(cmd, "/buylaptop", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(GetPlayerMoney(playerid) >= 2500)
	    {
	      if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
				{
					if PlayerInfo[playerid][pLaptop] != 1;
				  {
	      		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You bought a laptop!");
	      		GivePlayerMoney(playerid, -2500);
	      		PlayerInfo[playerid][pLaptop] = 1;
					}
	      }
	      else
	      {
	        SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You're not at a 24-7");
				}
	    }
	    else
	    {
	      SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You need 2500$ to buy a laptop");
	    }
		}
	}
	if (strcmp(cmd, "/selllaptop", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
 			if PlayerInfo[playerid][pLaptop] >= 1;
			{
			  			if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
							{
								 printf("%s Sold his Laptop!", name);
        					 PlayerInfo[playerid][pLaptop] = 0;
	     					 SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Sold your laptop");
	      					 GivePlayerMoney(playerid, 1500);
	      				 }
	      				 else
   						 {
	       	 		 SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You're not at a 24-7");
							 }
			}
				else
				{
				SendClientMessage(playerid, 0xDEEE20FF, "Don't try to sell what you don't have!");
				}
		}
	}
// END OF LAPTOP COMMANDS----------------------------------------------------------------------------------------

public OnPlayerText(playerid, text[])
{
	new string[256];
	new tmp[256];
  new InChat[MAX_PLAYERS];

    if(InChat[playerid] == 1)
	{
    if PlayerInfo[playerid][pVirus] != 0
		{
 		SendClientMessage(playerid, 0xFFFFFFFF, "Your Computer is Infected With Win32:Vitro!");
 		return 0;
		}
		else
		{
		new strings[56];
		GetPlayerName(playerid, name, sizeof(name));
 		format(strings, sizeof(strings), "[MSN %s] says: %s", name, text);
	 	LapUsersMssg(0xDEEE20FF, strings);
	 	new types[56];
	 	format(types, sizeof(types), "%s types on his laptop", name);
	 	ProxDetector(20.0, playerid, types, 0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF);
    return 0;
    }
	}
here is all parts of it, that laptop script is easy's laptop system filterscript.. i had to convert it for my gamemode because my players files were in a sub-file so it got all complicated for nothing... result of what hapening is i have a bugged down script and no backups, luckily my server is new so i won't lose players :P, but i'd like if anyone can get me help on that.. only thing compiler does is crash, but saving works perfectly (rare that you can't save but well...) if you need more info reply here, do not email/pm please and thanks alot
Reply
#2

Quote:
Originally Posted by nikoo
here are the parts of code i added to my script

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new RandomMSG[][] =
	{
  "Welcome to hornybaby.com, are you over 18? ((here's a virus))",
  "The internet is for porn, the internet is for porn! porn! porn!",
  "Mud...kip...Mud...kip...Mud...kip",
  "*yellings* OH YEEEA, HARDER! HARDER!",
  "You Got Rick Roll'd!"
	};
  if(dialogid == 1)
  {
    if(!response) SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!");
    new message[196];
    format(message, sizeof(message), "Firefox - Loading %s........", inputtext);
    SendClientMessage(playerid, 0xFFFFFFFF, message);
    new randMSG = random(sizeof(RandomMSG));
		SendClientMessage(playerid, 0xFFFFFFFF, RandomMSG[randMSG]);
    PlayerInfo[playerid][pVirus] = 1;
    return 1;
  }
  return 0;
}

public LapUsersMssg(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if PlayerInfo[playerid][pLaptop] >1)
			{
			  SendClientMessage(i, color, string);
			  PlayerPlaySound(i,1085,0.0,0.0,0.0);
			}
			else
			{
			return 1;
			}
		}
	}
	return 1;
}


// LAPTOP SYSTEM COMMANDS---------------------------------------------------------------
	if(strcmp(cmd, "/lad", true) == 0 || strcmp(cmd, "/ladvertise", true) == 0)
		{
      if PlayerInfo[playerid][pVirus] != 0
			{
  		SendClientMessage(playerid, 0xFFFFFFFF, "Your Computer is Infected With Win32:Vitro!");
  		return 0;
			}
			if PlayerInfo[playerid][pLaptop] >= 1
			{
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, 0xDEEE20FF, "USAGE: /[lad]vertise [TEXT]");
				return 1;
			}
			new pNames[MAX_PLAYER_NAME];
  		GetPlayerName(playerid, pNames, sizeof(pNames));
			format(string,sizeof(string), "[Popup by %s]: %s",pNames, result);
			LapUsersMssg(0xDEEE20FF, result);
		 	new types[56];
		 	format(types, sizeof(types), "%s types on his laptop", name);
		 	ProxDetector(20.0, playerid, types, 0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF);
			}
		 }
		 else
		 {
		  SendClientMessage(playerid, 0xFFFFFFFF, "You are not the owner of a Laptop!");
  		return 1;
		 }
  	}
	if(strcmp("/msn", cmd, true) == 0)
	{
	
		tmp = strtok(cmdtext,idx);

		if(!strlen(tmp) || strlen(tmp) > 5) {
			SendClientMessage(playerid,0xDEEE20FF,"/msn (id) (message)");
			return 1;
		}

		new id = strval(tmp);
    gMessage = strrest(cmdtext,idx);

		if(!strlen(gMessage)) {
			SendClientMessage(playerid,0xDEEE20FF,"/msn (id) (message)");
			return 1;
		}
		if(playerid != id)
		{
      if PlayerInfo[playerid][pLaptop] >= 1
			{
				GetPlayerName(id,iName,sizeof(iName));
				GetPlayerName(playerid,pName,sizeof(pName));
				format(Message,sizeof(Message),"[Incoming] %s(%d): %s",iName,id,gMessage);
				SendClientMessage(playerid,0xDEEE20FF,Message);
				format(Message,sizeof(Message),"[Message sent] %s(%d): %s",pName,playerid,gMessage);
				SendClientMessage(id,0xDEEE20FF,Message);
			}
			else
			{
			return 1;
			}
		}
		else
		{
			GetPlayerName(id,iName,sizeof(iName));
			GetPlayerName(playerid,pName,sizeof(pName));
			format(Message,sizeof(Message),"[Incoming] %s(%d): %s",iName,id,gMessage);
			SendClientMessage(playerid,0xDEEE20FF,Message);
			format(Message,sizeof(Message),"[Message sent] %s(%d): %s",pName,playerid,gMessage);
			SendClientMessage(id,0xDEEE20FF,Message);
		}
		return 1;
	}
	if (strcmp(cmd, "/laptophelp", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: :: Commands :: - /about, /buylaptop, /selllaptop, /email, /chatroom");
   		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: :: Commands :: - /leaveroom, /[lad]vertise, /internet, /buyantivirus");
   		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: :: Commands :: - /runCD");
	    return 1;
		}
	}
	if (strcmp(cmd, "/internet", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
      if PlayerInfo[playerid][pVirus] != 0
			{
  		SendClientMessage(playerid, 0xFFFFFFFF, "Your Computer is Infected With Win32:Vitro!");
  		return 0;
			}
      if PlayerInfo[playerid][pLaptop] >= 1
			{
 				new s[128];
			  new loginname[MAX_PLAYER_NAME];
			  GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
			  format(s,sizeof(s),"Welcome %s to Firefox\nPowered by Mozilla\nInternet Explorer is trash\nThats why you downloaded\nThis Browser!",loginname);
			  ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Type in Your Web Address",s,"Go","Cancel");
			}
			else
			{
	  		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Don't Have a Laptop!");
	  		return 1;
			}
		}
	}
	if (strcmp(cmd, "/runCD", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
			if PlayerInfo[playerid][pVirus] != 0 && if PlayerInfo[playerid][pAntivirus] == 1
			{
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Running CD......");
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Avast Anti-Virus Loaded..");
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Removing Virus!");
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Removal Complete!");
			  PlayerInfo[playerid][pVirus] = 0;
			}
			else
			{
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: you dont have avast!");
			  return 1;
			}
		}
	}
	if (strcmp(cmd, "/leaveroom", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
			if PlayerInfo[playerid][pLaptop] >= 1
			{
			  format(string, sizeof(string), "%s Has Left the Chatroom!", name );
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You left the chat room to rejoin type /chatroom");
        LapUsersMssg(0xDEEE20FF, string);
        InChat[playerid] = 0;
			}
			else
			{
	  		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Don't Have a Laptop!");
			}
		}
	}
	if (strcmp(cmd, "/chatroom", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
			if PlayerInfo[playerid][pLaptop] >= 1
			{
			  format(string, sizeof(string), "%s Has Joined the Chatroom!", name );
			  SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Press F6 (or t) To Type A Message To The ChatRoom!");
        LapUsersMssg(0xDEEE20FF, string);
        InChat[playerid] = 1;
			}
			else
			{
	  		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Don't Have a Laptop!");
			}
	  }
	}
	if (strcmp(cmd, "/about", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Laptop System Created By Comptons_Eazy_E");
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: Modified and Edited by Nikoo and Joemomma53");
	    SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: If you need help about the laptop system use /laptophelp");
		}
	}
	if (strcmp(cmd, "/buyantivirus", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(GetPlayerMoney(playerid) >= 3500)
	    {
	      if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
				{
					if PlayerInfo[playerid][pLaptop] >= 1;
					{
				  GivePlayerMoney(playerid, -5500);
					PlayerInfo[playerid][pAntivirus] = 1;
	      	SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Bought A Anti-Virus[AVAST] ((/runcd))");
	      	}
	      	else
	      	{
	      	SendClientMessage(playerid, 0xDEEE20FF, "You need a laptop first, smartass");
					}
				}
				else
	      {
	        SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You're not at a 24-7");
				}
      }
	    else
	    {
	      SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You need 3500$ to buy antivirus");
	    }
		}
	}
	if (strcmp(cmd, "/buylaptop", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(GetPlayerMoney(playerid) >= 2500)
	    {
	      if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
				{
					if PlayerInfo[playerid][pLaptop] != 1;
				  {
	      		SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You bought a laptop!");
	      		GivePlayerMoney(playerid, -2500);
	      		PlayerInfo[playerid][pLaptop] = 1;
					}
	      }
	      else
	      {
	        SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You're not at a 24-7");
				}
	    }
	    else
	    {
	      SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You need 2500$ to buy a laptop");
	    }
		}
	}
	if (strcmp(cmd, "/selllaptop", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
 			if PlayerInfo[playerid][pLaptop] >= 1;
			{
			  			if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
							{
								 printf("%s Sold his Laptop!", name);
       					 PlayerInfo[playerid][pLaptop] = 0;
	     					 SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You Sold your laptop");
	     					 GivePlayerMoney(playerid, 1500);
	     				 }
	     				 else
  						 {
	       	 		 SendClientMessage(playerid, 0xDEEE20FF, "[ Laptop System ]: You're not at a 24-7");
							 }
			}
				else
				{
				SendClientMessage(playerid, 0xDEEE20FF, "Don't try to sell what you don't have!");
				}
		}
	}
// END OF LAPTOP COMMANDS----------------------------------------------------------------------------------------

public OnPlayerText(playerid, text[])
{
	new string[256];
	new tmp[256];
  new InChat[MAX_PLAYERS];

    if(InChat[playerid] == 1)
	{
    if PlayerInfo[playerid][pVirus] != 0
		{
 		SendClientMessage(playerid, 0xFFFFFFFF, "Your Computer is Infected With Win32:Vitro!");
 		return 0;
		}
		else
		{
		new strings[56];
		GetPlayerName(playerid, name, sizeof(name));
 		format(strings, sizeof(strings), "[MSN %s] says: %s", name, text);
	 	LapUsersMssg(0xDEEE20FF, strings);
	 	new types[56];
	 	format(types, sizeof(types), "%s types on his laptop", name);
	 	ProxDetector(20.0, playerid, types, 0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF);
    return 0;
    }
	}
here is all parts of it, that laptop script is easy's laptop system filterscript.. i had to convert it for my gamemode because my players files were in a sub-file so it got all complicated for nothing... result of what hapening is i have a bugged down script and no backups, luckily my server is new so i won't lose players :P, but i'd like if anyone can get me help on that.. only thing compiler does is crash, but saving works perfectly (rare that you can't save but well...) if you need more info reply here, do not email/pm please and thanks alot
Please post in my topic!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)