SA-MP Forums Archive
/setforsale problem. - 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: /setforsale problem. (/showthread.php?tid=354507)



/setforsale problem. - Henry_Martinez - 27.06.2012

pawn Код:
command(setforsale, playerid, params[])
{
    new i, price, string[256];
    if(Player[playerid][Group] == 19)
    {
        if(sscanf(params, "dd", i, price)) return SendClientMessage(playerid, GREY, "Server: /setforsale [Vehicle ID(Get the ID through /dl)] [Price]");
        {
            format(string, sizeof(string), "You have set vehicle ID: %d for sale at the price of %d", i, price);
            SendClientMessage(playerid, GREY, string);
            format(string, sizeof(string), "For Sale\nPrice: %d\nCall 118 to purchase it.", price);
            vehicle3Dtext = Create3DTextLabel(string, WHITE, 0.0, 0.0, 0.0, 50.0, 0, 1);
            Attach3DTextLabelToVehicle(vehicle3Dtext, i, 0.0, 0.0, 0.0);
        }
    }
    else return SendClientMessage(playerid, GREY, "You are not in the correct Faction.");
    return 1;
}
Somehow the Attach3DTextLabelToVehicle Won't show up.


Re: /setforsale problem. - [A]ndrei - 27.06.2012

error's


Re: /setforsale problem. - Henry_Martinez - 27.06.2012

No, No errors


Respuesta: /setforsale problem. - Chris1337 - 27.06.2012

Wheres that enum/define

vehicle3Dtext


Re: /setforsale problem. - Henry_Martinez - 27.06.2012

I don't got a enum but i got an define
pawn Код:
new Text3D:vehicle3Dtext



Re: /setforsale problem. - [MM]RoXoR[FS] - 27.06.2012

pawn Код:
command(setforsale, playerid, params[])
{
    new i, price, string[256];
    if(Player[playerid][Group] == 19)
    {
        if(sscanf(params, "dd", i, price)) return SendClientMessage(playerid, GREY, "Server: /setforsale [Vehicle ID(Get the ID through /dl)] [Price]");
        else
            {
            format(string, sizeof(string), "You have set vehicle ID: %d for sale at the price of %d", i, price);
            SendClientMessage(playerid, GREY, string);
            format(string, sizeof(string), "For Sale\nPrice: %d\nCall 118 to purchase it.", price);
            vehicle3Dtext = Create3DTextLabel(string, WHITE, 0.0, 0.0, 0.0, 50.0, 0, 1);
            Attach3DTextLabelToVehicle(vehicle3Dtext, i, 0.0, 0.0, 0.0);
        }
    }
    else return SendClientMessage(playerid, GREY, "You are not in the correct Faction.");
    return 1;
}