31.12.2016, 13:41
Hello, I'm making advert system and decided to make 3DText attached to players car, what I want is when text reach 30 chars go in next column or whatever, something like this.
Selling this car for 30,000$, call 111111. - this is too long I want something like this
Selling this car for 30,000$
call 111111.
I think you get the point, here is my code, it is totally messed up because I've tried everything and nothing works properly.
Selling this car for 30,000$, call 111111. - this is too long I want something like this
Selling this car for 30,000$
call 111111.
I think you get the point, here is my code, it is totally messed up because I've tried everything and nothing works properly.
pawn Код:
CMD:carad(playerid, params[])
{
new
vehicleid = GetPlayerVehicleID(playerid),
string[60];
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, -1, "You're not in a vehicle.");
if(isnull(params))
return SendClientMessage(playerid, -1, "-> /carad [Advertisement text]");
/*if (!PlayerInfo[playerid][pCarAdvert])
return SendClientMessage(playerid, -1, "-> You don't have a Car Sign.");*/
if(VehicleHasSign[GetPlayerVehicleID(playerid)] == 1)
return SendClientMessage(playerid, -1, "Vehicle already has a sign.");
format(string, sizeof(string), "%s\n", params);
strcat(string, params, 30 char);
format(string, sizeof(string), "%s", params);
strcat(string, params, 30 char);
vehicle3Dtext[vehicleid] = Create3DTextLabel(string, COLOR_CARAD, 0.0, 0.0, 0.0, 10.0, 0, 1);
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicleid], vehicleid, -1.0, -2.0, 0.0);
VehicleHasSign[vehicleid] = 1;
//PlayerInfo[playerid][pCarAdvert] = false;
return 1;
}