~ The List of All My Bugs ~
#1

Hi, I want to open a Role-Play server, and i need to fix all the bugs. Here are the list:


//==============================[1. Drink Bug]==================================//

Description of Bug: You type /drink and nothing happened, it don't show to you any message!


~ BUG FIXED! ~
Reply
#2

//===============================[2. Local Chat Bug]==============================//


Description of bug: After you register an account, you can't speak in the chat, just using /s (shout) or /b. You can speak just after RE-LOG. I want to fix this.
Codes:

Code:
new realchat = 1;
Code:
if (realchat)
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	        return 0;
      	}
        new i;
		while (text[++i])
		{
			if(text[i] > 64 && text[i]< 91) text[i] += 32;
		}
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
	    	new Colors[] = { COLOR_WHITE, COLOR_YELLOW, COLOR_LIGHTGREEN, COLOR_LIGHTRED, TEAM_GROVE_COLOR, 0x008100AA };
			SetPlayerChatBubble(playerid,says: text, Colors[random(sizeof(Colors))], 50.0, 5000);
		}
		if(PlayerInfo[playerid][pAdmin] >= 1)
       	{
        	format(string, sizeof(string), " %s ", text);
         	SetPlayerChatBubble(playerid, string, 0xFFFF80FF, 30.0, 8000);
        }
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "%s Says: %s", sendername, text);
		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		return 0;
	}
	return 1;
}
Reply
#3

Why dont you make it in one post?
Reply
#4

//=============================[3.Vehicle Sellto Bug]====================================//


Description of Bug: You offer a car to a player but don't exist a command for accept the car (example: /accept ownablecar) I want to make a command wich ACCEPT THE OWNABLE CAR
Codes:

Code:
else if(strcmp(x_nr,"sellto",true) == 0)
	        {
				if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])
				{
				    GetPlayerName(playerid, sendername, sizeof(sendername));
				    new ownvehkey;
	                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; }
	                else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; }
        			else { return 1; }
				    if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0)
				    {
						tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
						    SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
						    return 1;
						}
						giveplayerid = ReturnUser(tmp);
						if(IsPlayerConnected(giveplayerid))
						{
							if(giveplayerid != INVALID_PLAYER_ID)
							{
							    if(ProxDetectorS(8.0, playerid, giveplayerid))
       							{
							    	if(PlayerInfo[giveplayerid][pPcarkey1] == 999)
							    	{
							            tmp = strtok(cmdtext, idx);
							            if(!strlen(tmp))
							            {
							                SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
							                return 1;
							            }
							            new price;
							            price = strval(tmp);
							            if(price < 1 || price > 1500000)
							            {
							                SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");
							                return 1;
							            }
							            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							       		format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);
					        			SendClientMessage(playerid, COLOR_WHITE, string);
					        			format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);
					        			SendClientMessage(giveplayerid, COLOR_WHITE, string);
					        			OwnableCarOffer[giveplayerid] = playerid;
					        			OwnableCarID[giveplayerid] = ownvehkey;
					        			OwnableCarPrice[giveplayerid] = price;
					        			return 1;
							        }
							        else if(PlayerInfo[giveplayerid][pPcarkey2] == 999)
							        {
							            tmp = strtok(cmdtext, idx);
							            if(!strlen(tmp))
							            {
							                SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
							                return 1;
							            }
							            new price;
							            price = strval(tmp);
							            if(price < 1 || price > 1500000)
							            {
							                SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");
							                return 1;
							            }
							            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							       		format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);
					        			SendClientMessage(playerid, COLOR_WHITE, string);
					        			format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);
					        			SendClientMessage(giveplayerid, COLOR_WHITE, string);
					        			OwnableCarOffer[giveplayerid] = playerid;
					        			OwnableCarID[giveplayerid] = ownvehkey;
					        			OwnableCarPrice[giveplayerid] = price;
					        			return 1;
							        }
							    }
							    else
							    {
							        SendClientMessage(playerid, COLOR_GREY, "   Player is not near you ! ");
							        return 1;
							    }
							}
						}
				    }
				    else
				    {
				        SendClientMessage(playerid, COLOR_GREY, "  This is not your car");
				        return 1;
				    }
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "  You have to sit at your own car to sell it");
				    return 1;
				}
	        }
//===================================[4. Some Warnings]====================================

- There are some warnings on compile:

Code:
- JunkBuster.inc(3248) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterRaceCheckpoint")
- GM.pwn(14833) : warning 202: number of arguments does not match definition
- GM.pwn(43001) : warning 203: symbol is never used: "Turfs"
And the lines:

Code:
Line number 14833 in GameMode:

ShowPlayerDialog(playerid, 50, DIALOG_STYLE_MSGBOX," Message 1 \nMessage 2.","Ok","Cancel");
Code:
Line number 43001 in GameMode:

LOL - THIS LINE IS THE END OF GAMEMODE, NOTHING THERE
Reply
#5

1. Try this code and see what messages you get.
pawn Code:
if(strcmp(cmd, "/drink", true) == 0)
    {
        SendClientMessage(playerid, -1, "/drink");
        if(IsAtBar(playerid))
        {
            if(PlayerDrunk[playerid] < 10)
            {
                SendClientMessage(playerid, -1, "ShowPlayerDialog");
                ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Drink Menu", "Beer($6)\nVodka($10)\nWhiskey($15)\nWine($10)\nTequila($20)\nWather($2)\nSoda($2)\nCoca-Cola($5)\nSchweppes($5)\nPrigat($7)\nFanta($7)\nSprite($7)\nCaffe($3)\nCocktail($7)","Buy", "Cancel");
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, " You can't drink anymore, you will throw up !");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE,"You are not at bar");
            return 1;
        }
    }
2. You have to log in after you register.

3. Do you have /accept command?
Reply
#6

Quote:
Originally Posted by MadeMan
View Post
1. Try this code and see what messages you get.
pawn Code:
if(strcmp(cmd, "/drink", true) == 0)
    {
        SendClientMessage(playerid, -1, "/drink");
        if(IsAtBar(playerid))
        {
            if(PlayerDrunk[playerid] < 10)
            {
                SendClientMessage(playerid, -1, "ShowPlayerDialog");
                ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Drink Menu", "Beer($6)\nVodka($10)\nWhiskey($15)\nWine($10)\nTequila($20)\nWather($2)\nSoda($2)\nCoca-Cola($5)\nSchweppes($5)\nPrigat($7)\nFanta($7)\nSprite($7)\nCaffe($3)\nCocktail($7)","Buy", "Cancel");
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, " You can't drink anymore, you will throw up !");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE,"You are not at bar");
            return 1;
        }
    }
2. You have to log in after you register.

3. Do you have /accept command?

1. LOL, It's don't showing me any message !
2. I can't fix this ?
3. The /accept command does not exist !
Reply
#7

2. If you don't want player to be logged in, then delete this part:

pawn Code:
if(gPlayerLogged[playerid] == 0)
{
    return 0;
}
Reply
#8

No, the problem is that:

YOU REGISTER AN ACCOUNT, AND LOG IN YOUR ACCOUNT, AND YOU CAN'T SPEAK ! (YOU ARE LOGGED IN) YOU CAN SPEAK JUST NEXT TIME YOU LOG IN, AT THE FIRST LOG YOU CAN'T SPEAK !
Reply
#9

YOU MUST BE AT BAR to use /drink
Reply
#10

I try to use /drink at bar but nothing happened ! AND WHEN I'M NOT AT THE BAR IT SHOULD TELL ME: YOU ARE NOT AT BAR, BUT NO MESSAGE APPEAR !


Sorry my bad english !
Reply
#11

#1 BUG Fixed !


I need help just with #2 #3 #4

Thanks !
Reply
#12

Mr Blake going by your post im guessing you dont have much scripting knowledge so im guessing youve downloaded a Gamemode while if you have goto the gamemode realse look through the posts 9/10 its there
Reply
#13

Do what MadeMan said. It perfectly does what you want, just remove it.
Reply
#14

Quote:
Originally Posted by PGTips
View Post
Mr Blake going by your post im guessing you dont have much scripting knowledge so im guessing youve downloaded a Gamemode while if you have goto the gamemode realse look through the posts 9/10 its there
If I can't fix these bugs, what's the problem ? I'am newbie scripter.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)