Problem with NPCs/BOTs
#3

Код:
public OnPlayerConnect(playerid)
{

    new plrIP[16]; // The varyable
    GetPlayerIp(playerid, plrIP, sizeof(plrIP)); // I am getting their IP and storing it.

	new stringg[156];
 	new namee[30];
    GetPlayerName(playerid,namee,30);
	format(stringg,sizeof(stringg),"~g~Connect: ~y~%s~b~ [%d]",namee,playerid);
    AddConnection(stringg);
    
    PlayerIP[playerid] = plrIP;
	
	if(!IsPlayerNPC(playerid))
	{
	    new name[30];
	    GetPlayerName(playerid,name,30);
	    if(!strcmp(name,"[BOT]Tension",true) || !strcmp(name,"[BOT]Major",true) || !strcmp(name,"Vacant_House",true) || !strcmp(name,"Vacant_Business",true) || !strcmp(name,"[BOT]Osama",true) || !strcmp(name,"[BOT]Charlie",true) || !strcmp(name,"[BOT]Buzz",true) || !strcmp(name,"[BOT]Del_Trotter",true))
	    {
	        SendClientMessage(playerid,COLOR_RED,"This name is reserved! Change your name!");
			Kick(playerid);
		}
	}
	else
	if(IsPlayerNPC(playerid)) return SpawnPlayer(playerid);
Reply


Messages In This Thread
Problem with NPCs/BOTs - by donB - 09.01.2011, 06:23
Re: Problem with NPCs/BOTs - by Mr.Stranger - 09.01.2011, 09:29
Re: Problem with NPCs/BOTs - by donB - 09.01.2011, 10:13

Forum Jump:


Users browsing this thread: 1 Guest(s)