SA-MP Forums Archive
[Help] Textdraws and other - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Textdraws and other (/showthread.php?tid=560849)



[Help] Textdraws and other - ShoortyFl - 30.01.2015

So, when i use this command, it works, camera sets to the right position, but textdraws wont show up, and These SendClientMessage's show up but also a Server: Uknown Command below that, idk what the problem is there is the command.

pawn Код:
CMD:buyveh(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 2131.7756,-1150.8191,24.1150))
    {
        LiderKupuje[playerid] = true;
        TogglePlayerControllable(playerid, 0);
        InterpolateCameraPos(playerid, 2131.715820, -1148.528076, 25.157514, 2156.001708, -1159.143920, 31.072139, 5000);
        InterpolateCameraLookAt(playerid, 2131.845214, -1153.398803, 24.035547, 2152.776855, -1162.081176, 28.628217, 5000);

        SCM(playerid, WHITE, "Message 1.");
        SCM(playerid, WHITE, "Message 2.");
        SCM(playerid, WHITE, "Message 3.");
        SCM(playerid, WHITE, "Message 4.");

        new str[128], str2[128];
        IzlozbenoVozilo[playerid] = CreateVehicle(OrgVozila[Autosalon[playerid]][0], 2148.2092,-1166.2465,23.7537,271.1449, 1, 1, -1);
        format(str, sizeof(str), "Vehicle: %s", ImenaVozila[OrgVozila[Autosalon[playerid]][0]]);
        TextDrawSetString(LiderBuyingVeh0[playerid], str);
        format(str2, sizeof(str2), "Price: $%d", ImenaVozila[OrgVozila[Autosalon[playerid]][1]]);
        TextDrawSetString(LiderBuyingVeh1[playerid], str2);

        TextDrawShowForPlayer(playerid, LiderBuyingVeh0[playerid]);
        TextDrawShowForPlayer(playerid, LiderBuyingVeh1[playerid]);
    }
    else return SCM(playerid, GREY, "You're not on the right position.");
    return 1;
}


LiderBuyingVeh0[playerid] = TextDrawCreate(316.500000, 389.812500, "Vehicle: Premier");
TextDrawLetterSize(LiderBuyingVeh0[playerid], 0.449999, 1.600000);
TextDrawAlignment(LiderBuyingVeh0[playerid], 2);
TextDrawColor(LiderBuyingVeh0[playerid], 8388863);
TextDrawSetShadow(LiderBuyingVeh0[playerid], 0);
TextDrawSetOutline(LiderBuyingVeh0[playerid], 1);
TextDrawBackgroundColor(LiderBuyingVeh0[playerid], 51);
TextDrawFont(LiderBuyingVeh0[playerid], 3);
TextDrawSetProportional(LiderBuyingVeh0[playerid], 1);

LiderBuyingVeh1[playerid] = TextDrawCreate(317.000000, 410.375000, "Price: $200000");
TextDrawLetterSize(LiderBuyingVeh1[playerid], 0.449999, 1.600000);
TextDrawAlignment(LiderBuyingVeh1[playerid], 2);
TextDrawColor(LiderBuyingVeh1[playerid], 8388863);
TextDrawSetShadow(LiderBuyingVeh1[playerid], 0);
TextDrawSetOutline(LiderBuyingVeh1[playerid], 1);
TextDrawBackgroundColor(LiderBuyingVeh1[playerid], 51);
TextDrawFont(LiderBuyingVeh1[playerid], 3);
TextDrawSetProportional(LiderBuyingVeh1[playerid], 1);



Re: [Help] Textdraws and other - ShoortyFl - 30.01.2015

Anyone ? It's urgent.


Re: [Help] Textdraws and other - ikey07 - 30.01.2015

And where you create those textdraws?


Re: [Help] Textdraws and other - DRIFT_HUNTER - 30.01.2015

Im sure problem is somewhere here:
pawn Код:
IzlozbenoVozilo[playerid] = CreateVehicle(OrgVozila[Autosalon[playerid]][0], 2148.2092,-1166.2465,23.7537,271.1449, 1, 1, -1);
        format(str, sizeof(str), "Vehicle: %s", ImenaVozila[OrgVozila[Autosalon[playerid]][0]]);
        TextDrawSetString(LiderBuyingVeh0[playerid], str);
        format(str2, sizeof(str2), "Price: $%d", ImenaVozila[OrgVozila[Autosalon[playerid]][1]]);
If im right you are going into overflow.
Only way to know that is wrong is to debug all variables used there. (If you want prof that its rely problem just comment those format functions, and try command then - it will show textdraws as they are and no Wrong command error)