VEHICLE DEALERSHIP PROBLEM!
#1

Why only ID 0 can saw the dealership textdraw
When Player not ID 0 type in the command nothing happen

pawn Код:
COMMAND:vehiclebuy(playerid,params[])
{
    if(IsPlayerInDynamicCP(playerid, dealershipcp))
    {
        if(showingdealer[playerid] == 0)
        {
            dealercreate(playerid);
        }
        SelectTextDraw(playerid, 0xA3B4C5FF);
        SCM(playerid,COLOR_ORANGE,"[VEHICLE DAELERSHIP] {FFFFFF}Welcome to the vehicle dealership.");
        return 1;
    }
    return 1;
}
Reply
#2

if(showingdealer[playerid] == 0)
Maybe? :/
Reply
#3

Can you show us the function
PHP код:
dealercreate(playerid); 
?
Reply
#4

pawn Код:
stock dealercreate(playerid)
{
    DEALERSHIPTD0[playerid] = CreatePlayerTextDraw(playerid,323.000000, 127.000000, "~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~");
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD0[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD0[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD0[playerid], 2);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD0[playerid], 0.300000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD0[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD0[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD0[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD0[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD0[playerid], 127);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD0[playerid], 0.000000, 350.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD0[playerid], 0);

    DEALERSHIPTD1[playerid] = CreatePlayerTextDraw(playerid,151.000000, 119.000000, "VEHICLE DEALERSHIP");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD1[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD1[playerid], 2);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD1[playerid], 0.220000, 1.300000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD1[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD1[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD1[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD1[playerid], 0);

    DEALERSHIPTD2[playerid] = CreatePlayerTextDraw(playerid,160.000000, 140.000000, "New DEALERSHIPTD");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD2[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD2[playerid], 5);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD2[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD2[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD2[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD2[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD2[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD2[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD2[playerid], 0x00000000);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD2[playerid], 80.000000, 80.000000);
    PlayerTextDrawSetPreviewModel(playerid, DEALERSHIPTD2[playerid], carmodelid[playerid]);
    PlayerTextDrawSetPreviewRot(playerid, DEALERSHIPTD2[playerid], -16.000000, 0.000000, -55.000000, 1.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD2[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, DEALERSHIPTD2[playerid], 0x00000000);
    PlayerTextDrawSetPreviewVehCol(playerid,DEALERSHIPTD2[playerid], color1[playerid], color2[playerid]);

    DEALERSHIPTD3[playerid] = CreatePlayerTextDraw(playerid,160.000000, 215.000000, "New DEALERSHIPTD");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD3[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD3[playerid], 5);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD3[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD3[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD3[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD3[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD3[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD3[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD3[playerid], 0x00000000);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD3[playerid], 80.000000, 80.000000);
    PlayerTextDrawSetPreviewModel(playerid, DEALERSHIPTD3[playerid], carmodelid[playerid]);
    PlayerTextDrawSetPreviewRot(playerid, DEALERSHIPTD3[playerid], -16.000000, 0.000000, 0.000000, 1.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD3[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, DEALERSHIPTD3[playerid], 0x00000000);
    PlayerTextDrawSetPreviewVehCol(playerid,DEALERSHIPTD3[playerid], color1[playerid], color2[playerid]);

    DEALERSHIPTD4[playerid] = CreatePlayerTextDraw(playerid,230.000000, 215.000000, "New DEALERSHIPTD");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD4[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD4[playerid], 5);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD4[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD4[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD4[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD4[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD4[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD4[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD4[playerid], 0x00000000);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD4[playerid], 80.000000, 80.000000);
    PlayerTextDrawSetPreviewModel(playerid, DEALERSHIPTD4[playerid], carmodelid[playerid]);
    PlayerTextDrawSetPreviewRot(playerid, DEALERSHIPTD4[playerid], -16.000000, 0.000000, 180.000000, 1.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD4[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, DEALERSHIPTD4[playerid], 0x00000000);
    PlayerTextDrawSetPreviewVehCol(playerid,DEALERSHIPTD4[playerid], color1[playerid], color2[playerid]);

    DEALERSHIPTD5[playerid] = CreatePlayerTextDraw(playerid,230.000000, 140.000000, "New DEALERSHIPTD");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD5[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD5[playerid], 5);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD5[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD5[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD5[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD5[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD5[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD5[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD5[playerid], 0x00000000);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD5[playerid], 80.000000, 80.000000);
    PlayerTextDrawSetPreviewModel(playerid, DEALERSHIPTD5[playerid], carmodelid[playerid]);
    PlayerTextDrawSetPreviewRot(playerid, DEALERSHIPTD5[playerid], 0.000000, 0.000000, 270.000000, 1.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD5[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, DEALERSHIPTD5[playerid], 0x00000000);
    PlayerTextDrawSetPreviewVehCol(playerid,DEALERSHIPTD5[playerid], color1[playerid], color2[playerid]);

    DEALERSHIPTD6[playerid] = CreatePlayerTextDraw(playerid,401.000000, 146.000000,VehicleNames[carmodelid[playerid] -400]);
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD6[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD6[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD6[playerid], 3);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD6[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD6[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD6[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD6[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD6[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD6[playerid], 0);

    DEALERSHIPTD7[playerid] = CreatePlayerTextDraw(playerid,322.000000, 142.000000, "~<~");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD7[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD7[playerid], 1);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD7[playerid], 0.639999, 1.600000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD7[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD7[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD7[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD7[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD7[playerid], 1);

    DEALERSHIPTD8[playerid] = CreatePlayerTextDraw(playerid,470.000000, 142.000000, "~>~");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD8[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD8[playerid], 1);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD8[playerid], 0.639999, 1.600000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD8[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD8[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD8[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD8[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD8[playerid], 1);

    DEALERSHIPTD9[playerid] = CreatePlayerTextDraw(playerid,468.000000, 165.000000, "ld_chat:badchat");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD9[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD9[playerid], 4);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD9[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD9[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD9[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD9[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD9[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD9[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD9[playerid], 255);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD9[playerid], 17.000000, 17.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD9[playerid], 1);\
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD9[playerid],20,10);

    DEALERSHIPTD10[playerid] = CreatePlayerTextDraw(playerid,468.000000, 184.000000, "ld_chat:badchat");
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD10[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD10[playerid], 4);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD10[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD10[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD10[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD10[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD10[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD10[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD10[playerid], 255);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD10[playerid], 17.000000, 17.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD10[playerid], 1);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD10[playerid],20,10);

    new string[100];
    format(string,sizeof string,"COLOR %d",color1[playerid]);
    DEALERSHIPTD11[playerid] = CreatePlayerTextDraw(playerid,401.000000, 166.000000, string);
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD11[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD11[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD11[playerid], 3);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD11[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD11[playerid], VehicleColoursTableRGBA[color1[playerid]]);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD11[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD11[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD11[playerid], 0);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD11[playerid], 0);

    new string1[100];
    format(string1,sizeof string1,"COLOR %d",color2[playerid]);
    DEALERSHIPTD12[playerid] = CreatePlayerTextDraw(playerid,401.000000, 186.000000, string1);
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD12[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD12[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD12[playerid], 3);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD12[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD12[playerid], VehicleColoursTableRGBA[color2[playerid]]);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD12[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD12[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD12[playerid], 0);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD12[playerid], 0);

    new string2[100];
    format(string2,sizeof string2,"PRICE:~n~~G~$ %s",Comma(VehiclePrice[carmodelid[playerid] -400]));
    DEALERSHIPTD15[playerid] = CreatePlayerTextDraw(playerid,403.000000, 206.000000, string2);
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD15[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD15[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD15[playerid], 2);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD15[playerid], 0.350000, 1.600000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD15[playerid], 1414812927);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD15[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD15[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD15[playerid], 0);

    DEALERSHIPTD16[playerid] = CreatePlayerTextDraw(playerid,402.000000, 253.000000, "TEST DRIVE");
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD16[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD16[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD16[playerid], 2);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD16[playerid], 0.350000, 1.600000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD16[playerid], 852308735);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD16[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD16[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD16[playerid], 1);

    DEALERSHIPTD17[playerid] = CreatePlayerTextDraw(playerid,403.000000, 272.000000, "PURCHASE");
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD17[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD17[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD17[playerid], 2);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD17[playerid], 0.350000, 1.600000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD17[playerid], -16776961);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD17[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD17[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD17[playerid], 1);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD17[playerid],50,20);

    DEALERSHIPTD18[playerid] = CreatePlayerTextDraw(playerid,493.000000, 126.000000, "X");
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD18[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD18[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD18[playerid], 3);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD18[playerid], 0.500000, 1.100000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD18[playerid], -16776961);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD18[playerid], 1);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD18[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD18[playerid], 1);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD18[playerid],20,10);

    DEALERSHIPTD19[playerid] = CreatePlayerTextDraw(playerid,235.000000, 141.000000, "~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~");
    PlayerTextDrawAlignment(playerid,DEALERSHIPTD19[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,DEALERSHIPTD19[playerid], 255);
    PlayerTextDrawFont(playerid,DEALERSHIPTD19[playerid], 1);
    PlayerTextDrawLetterSize(playerid,DEALERSHIPTD19[playerid], 0.500000, 1.000000);
    PlayerTextDrawColor(playerid,DEALERSHIPTD19[playerid], -1);
    PlayerTextDrawSetOutline(playerid,DEALERSHIPTD19[playerid], 0);
    PlayerTextDrawSetProportional(playerid,DEALERSHIPTD19[playerid], 1);
    PlayerTextDrawSetShadow(playerid,DEALERSHIPTD19[playerid], 1);
    PlayerTextDrawUseBox(playerid,DEALERSHIPTD19[playerid], 1);
    PlayerTextDrawBoxColor(playerid,DEALERSHIPTD19[playerid], 63);
    PlayerTextDrawTextSize(playerid,DEALERSHIPTD19[playerid], 0.000000, 150.000000);
    PlayerTextDrawSetSelectable(playerid,DEALERSHIPTD19[playerid], 0);

    PlayerTextDrawShow(playerid,DEALERSHIPTD0[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD1[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD2[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD3[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD4[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD5[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD6[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD7[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD8[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD9[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD10[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD11[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD12[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD13[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD14[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD15[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD16[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD17[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD18[playerid]);
    PlayerTextDrawShow(playerid,DEALERSHIPTD19[playerid]);
    showingdealer[playerid] = 1;
    vehprice[playerid] = VehiclePrice[carmodelid[playerid] -400];
    return 1;
}
Reply
#5

somebody help me
Reply
#6

Try this:
Код:
COMMAND:vehiclebuy(playerid,params[])
{
        for(new i=0;i<MAX_PLAYERS;i++)
        {
	if(IsPlayerInDynamicCP(i, dealershipcp))
	{
	    if(showingdealer[i] == 0)
	    {
	    	dealercreate(i);
		}
	    SelectTextDraw(i, 0xA3B4C5FF);
	    SCM(i,COLOR_ORANGE,"[VEHICLE DAELERSHIP] {FFFFFF}Welcome to the vehicle dealership.");
		return 1;
	}
         }
	return 1;
}
Reply
#7

Log some debug messages under the 'vehiclebuy' command.

For example:
Код:
printf("Debug: %d", showingdealer[playerid]);
It'll be easier to find the source of the problem.
Reply
#8

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
Try this:
Код:
COMMAND:vehiclebuy(playerid,params[])
{
        for(new i=0;i<MAX_PLAYERS;i++)
        {
	if(IsPlayerInDynamicCP(i, dealershipcp))
	{
	    if(showingdealer[i] == 0)
	    {
	    	dealercreate(i);
		}
	    SelectTextDraw(i, 0xA3B4C5FF);
	    SCM(i,COLOR_ORANGE,"[VEHICLE DAELERSHIP] {FFFFFF}Welcome to the vehicle dealership.");
		return 1;
	}
         }
	return 1;
}
Why do you need a loop? He want to show the textdraw for playerid who tapped the command.
Reply
#9

Not Working at all . Someone can fix it
Reply
#10

Do it like this, should be working now..

Код:
COMMAND:vehiclebuy(playerid,params[])
{
	if(IsPlayerInDynamicCP(i, dealershipcp))
	{
		if(showingdealer[i] == 0)
		{
			dealercreate(i);
		}
		SelectTextDraw(i, 0xA3B4C5FF);
		SCM(i,COLOR_ORANGE,"[VEHICLE DAELERSHIP] {FFFFFF}Welcome to the vehicle dealership.");
		return 1;
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)