3 Bugs help +Rep
#1

you have been killed by spartaaa (IT'S ON MY SCREEN)
when i killed u its say you have been


Код:
//==============================================================================
//OnPlayerDeath
//==============================================================================
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == playerid) return 1; // They either fell, or took self-inflicted damage somehow.
    new string[75];
    format(string, sizeof(string), "~g~You have killed %s.", GetName(playerid));
    GameTextForPlayer(playerid, string, 2000, 3);
    format(string, sizeof(string), "~g~You have been killed by %s.", GetName(killerid));
    GameTextForPlayer(killerid, string, 2000, 3);


    //--------------------------------------------------------------------------
    //Settings & Others
    //--------------------------------------------------------------------------
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerWantedLevel(playerid, 0);
    SendDeathMessage(killerid, playerid, reason);
    if(killerid != INVALID_PLAYER_ID)
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    }
    GivePlayerMoney(killerid, 100);
    GivePlayerMoney(playerid, 0);

    //--------------------------------------------------------------------------
    //Textdraw's Hide/Show
    //--------------------------------------------------------------------------
    TextDrawShowForPlayer(playerid, Textdraw27);

    //TextDrawHideForPlayer(playerid, Textdraw0);
    //TextDrawHideForPlayer(playerid, Textdraw4);
    //TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    TextDrawHideForPlayer(playerid, Textdraw81);
    TextDrawHideForPlayer(playerid, Textdraw82);
    TextDrawHideForPlayer(playerid, Textdraw83);
    TextDrawHideForPlayer(playerid, Textdraw84);

    TextDrawHideForPlayer(playerid, TeleTD1);
    TextDrawHideForPlayer(playerid, TeleTD2);
    TextDrawHideForPlayer(playerid, TeleTD3);
__________________________________________________ ____________
while i'm in DM i wrote /leave but it's still saying /leave



Код:
CMD:leave(playerid, params [])
{

    new rand = random(sizeof(Leavespawnpoints));
	SetPlayerPos(playerid, Leavespawnpoints[rand][0], Leavespawnpoints[rand][1], Leavespawnpoints[rand][2]);
	SetPlayerVirtualWorld(playerid, 0);
	SetPlayerInterior(playerid, 0);
	ResetPlayerWeapons(playerid);
    SetPlayerHealth(playerid, 100);
    return 1;
}
__________________________________________________ __

Why chat text color is green and line is too small? see pic


Reply
#2

1 -

Replace
pawn Код:
format(string, sizeof(string), "~g~You have killed %s.", GetName(playerid));
GameTextForPlayer(killerid, string, 2000, 3);
format(string, sizeof(string), "~g~You have been killed by %s.", GetName(killerid));
GameTextForPlayer(playerid, string, 2000, 3);
2 - Try SpawnPlayer(playerid);

3 - Check OnPlayerText
Reply
#3

Код:
//==============================================================================
// Player Text
//==============================================================================
public OnPlayerText(playerid, text[])
{
	new pChat[128], string[128], ctime, PText[256];
	//--------------------------------------------------------------------------
	//Anti Advertising
	//--------------------------------------------------------------------------
	if(GoIP(text) && !IsPlayerAdmin(playerid))
	{
	    //----------------------------------------------------------------------
  		SendClientMessage(playerid, orange, "You have been {11FF00}Banned{FF9900} for advertising an IP Address!");
		SendClientMessage(playerid, orange, "If you think it was an mistake, visit {11FF00}http://ufs.createaforum.com/unban-requests/{FF9900} for Unban!");
		//----------------------------------------------------------------------
		return BanEx(playerid, "(IP Ads)");
	}
	//--------------------------------------------------------------------------
	// Block CapsLock
	//--------------------------------------------------------------------------
	if(AccInfo[playerid][Caps] == 1)
	{
		UpperToLower(text);
	}
	//--------------------------------------------------------------------------
	// Vip Chat
	//--------------------------------------------------------------------------
	if(text[0] == '!' && AccInfo[playerid][pVip] >= 3)
	{
		//----------------------------------------------------------------------
		format(pChat, 128, "VIP{00FF00} %s: {00FF00}%s", PlayerName2(playerid),text[1]);
		MessageToPlayerVIP(orange, pChat);
		//----------------------------------------------------------------------
		//SaveIn("ChatVipLog",pChat);
	    return 0;
	}
	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	if(text[0] == '!' && AccInfo[playerid][pVip] >= 3)
	{
	    //----------------------------------------------------------------------
		format(pChat, 128, "VIP{00FF00} %s: {00FF00}%s", PlayerName2(playerid),text[1]);
		MessageToPlayerVIP(orange, pChat);
		//----------------------------------------------------------------------
		//SaveIn("ChatVipLog",pChat);
	    return 0;
	}
	//--------------------------------------------------------------------------
	// Administration Chat
	//--------------------------------------------------------------------------
	if(text[0] == '@' && AccInfo[playerid][Level] >= 1)
	{
		//----------------------------------------------------------------------
		format(pChat, 128, "Admin {00FF00} %s: {00FF00}%s", PlayerName2(playerid),text[1]);
		MessageToAdmins(orange, pChat);
		//----------------------------------------------------------------------
		SaveIn("AdmChatLog", pChat);
	    return 0;
	}
 //--------------------------------------------------------------------------
	//Clan's Chat
	/*/--------------------------------------------------------------------------
	if(text[0] == '$')
	{
	    //----------------------------------------------------------------------
		format(pChat, 128, "Clan Chat: {FF4400} %s: {15FF00}%s",PlayerName2(playerid), text[1]);
		SendMessageToClanMembers(playerid, orange, pChat);
		//----------------------------------------------------------------------
	    return 0;
	}
	*///--------------------------------------------------------------------------
	//BRB/AFK System
	//--------------------------------------------------------------------------
	if(AccInfo[playerid][BRBSts] == 1)
	{
		GameTextForPlayer(playerid, "~w~Use ~g~/Back~w~ to return", 6000, 4);
        return 0;
    }
	//--------------------------------------------------------------------------
	//Anti-Spam
	//------------------------------------------------------------------------
Reply
#4

anyone!@#!@#!?
Reply
#5

Don't make double post.

The text "(Admin UFS)" isn't in that code... search it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)