[Pedido] Textlabel Veiculo Exclusivo -
[Red]Maninho - 20.05.2012
Tenho um sistema de veiculos exclusivos, antigo jб, e qeria por um Textlabel nele
quando cria, podem me ajudar??
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256],tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/setcar", true) == 0) {
if(!IsPlayerAdmin(playerid)){return 0;}
new plid, modeloid,cor1,cor2;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, vermelho, "[Info-RedBull]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]");
return 1;
}
plid = strval(tmp);
//======================================================================
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, vermelho, "[Info-RedBull]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]");
return 1;
}
modeloid = strval(tmp);
//======================================================================
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, vermelho, "[Info-RedBull]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]");
return 1;
}
cor1 = strval(tmp);
//======================================================================
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, vermelho, "[Info-RedBull]: /setcar [PlayerID] [ModeloID] [Cor1] [Cor2]");
return 1;
}
cor2 = strval(tmp);
//======================================================================
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, vermelho, "[Info-RedBull]: Jogador nгo estб conectado!");
return 1;
}
if(modeloid >= 400 && modeloid <= 611){
if(CriarVeiculoPlayer(playerid,plid,modeloid,cor1,cor2)){
SendClientMessage(playerid, verde, "[Info-RedBull]: Veiculo Criado e Salvo com sucesso!");
new msg[256];
format(msg,256,"[Info-RedBull]: O Administrador %s Criou Um Veiculo Exclusivo Para Vocк!",PlayerNome(playerid));
SendClientMessage(plid, verde, msg);
}else{
SendClientMessage(playerid, verde, "[Info-RedBull]: Erro ao criar o veiculo!");
}
return 1;
}else{
SendClientMessage(playerid, vermelho, "[Info-RedBull]: Modelo ID Incorreto! (400-611)");
return 1;
}
}
return 0;
}
Re: [Pedido] Textlabel Veiculo Exclusivo -
Don_Speed - 20.05.2012
Use Create3DTextLabel e Attach3DTextLabelToVehicle !!
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Respuesta: [Pedido] Textlabel Veiculo Exclusivo -
[Red]Maninho - 20.05.2012
tou pedindo ajuda, pqe nao sei fazer isso '-'
Re: [Pedido] Textlabel Veiculo Exclusivo -
mengueh - 20.05.2012
pawn Код:
CMD:carro(playerid, params[])
{
new id, cid, Float:c[5], cor1, cor2, nome[24], string[128], Text3D:carro, carroid;
if(PlayerInfo[playerid][mAdmin] < 3) return SendClientMessage(playerid, VERMELHO, falha);
if(sscanf(params, "dddd", id, cid, cor1, cor2)) return SendClientMessage(playerid, BRANCO, "[INFO] /carro [id] [carid] [cor1] [cor2]");
{
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, VERMELHO, "[INFO]: Jogador invбlido!");
{
GetPlayerName(id, nome, 24);
format(string,sizeof(string), "[INFO]: Vocк deu um carro para %s", nome);
SendClientMessage(playerid, AZUL, string);
SendClientMessage(id, AMARELO, "[INFO]: Parabйns! Vocк ganhou um carro!");
GetPlayerPos(id, c[0], c[1], c[2]);
carroid = CreateVehicle(cid, c[0]+2, c[1]+2, c[2]+2, c[2], cor1, cor2, -1);
GetPlayerName(id, nome, 24);
format(string, sizeof(string), "Carro de: %s", nome);
carro = Create3DTextLabel(string, 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle(carro, carroid, 0.0, -2.9, 0.0);
}
}
return 1;
}
Ai tб o exemplo perfeito. Funciona direitinho