Comando Criar Veiculo. -
Matthy - 12.06.2014
Olб
Estou Querendo Resolver Um Problema Simples!
Eu Fiz Um Comando Que Cria Um Infernus Onde Vocк Quiser.
Comando:
pawn Код:
if(strcmp(cmdtext,"/c",true) == 0)
{
new Float:P[3];
new string[150];
new pNome[MAX_PLAYER_NAME];
GetPlayerPos(playerid, P[0], P[1], P[2]);
CreateVehicle(411, P[0], P[1], P[2], 40.5183, 1,1, -1);
GetPlayerName(playerid, pNome, sizeof(pNome));
format(string, sizeof(string), "[INFO-SERVER]{FC0000}%s {FFFFFF}Acabou de Criar Um {FC0000}Carro{FFFFFF}, Nome Do Veiculo: {FC0000}Elegy", pNome);
SendClientMessageToAll(-1, string);
PutPlayerInVehicle(playerid, Suricato, 0);
return 1;
}
Eu Quero Que Assim Que o Player Sair Do Carro Que Foi Criado, o Carro Fosse Destruido.
Com Este Comando, O Veiculo Nгo й Destruido. Assim Que Ele Explodi Ele Respawna Pro Lugar Que Eu Criei.
__________________________________________________ _
Em Breve Um GM!
Brasil Instant Kill
Re: Comando Criar Veiculo. -
SpeakDS - 12.06.2014
pawn Код:
new Ccarro;
new Float:P[3];
new string[150];
new pNome[MAX_PLAYER_NAME];
if (strcmp(cmdtext, "/c", true)==0)
{
if(Ccarro == 0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Car", CreateVehicle(411, X, Y, Z, 0.0, -1, -1, -1));
format(string, sizeof(string), "[INFO-SERVER]{FC0000}%s {FFFFFF}Acabou de Criar Um {FC0000}Carro{FFFFFF}, Nome Do Veiculo: {FC0000}Infernus", pNome);
Ccarro = 1;
}
if(Ccarro == 1) return SendClientMessage(playerid,-1,"Vocк jб criou um carro");
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(vehicleid == GetPVarInt(playerid, "Car"))
{
DestroyVehicle(vehicleid);
DeletePVar(playerid, "Car");
Ccarro = 0;
}
return 1;
}
Respuesta: Comando Criar Veiculo. -
Matthy - 12.06.2014
Olб
Vou Testar Lбh, Depois Eu Aviso Se Deu Certo.
________________________
Em Breve Um GM!
Brasil Instant Kill
Re: Comando Criar Veiculo. -
MultiKill - 13.06.2014
@Edit
O cara ali em cima fez de uma forma melhor.
Respuesta: Comando Criar Veiculo. -
Matthy - 13.06.2014
Olб
Cara, Nгo Mudou Nada. Continua Ele Ficando No Jogo.
Meu Objetivo Erб Que Ele Se Destruise Apуs o Jogador Sair Do Carro.
_________________________________
Em Breve Um GM!
Brasil Instant Kill
Re: Comando Criar Veiculo. -
MultiKill - 13.06.2014
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == GetPVarInt(playerid, "Car"))
{
DestroyVehicle(vehicleid);
DeletePVar(playerid, "Car");
Ccarro = 0;
}
}
return 1;
}
Respuesta: Comando Criar Veiculo. -
Matthy - 13.06.2014
Olб
Funcionou, Vlw.
_____________________
Em Breve Um GM!
Brasil Instant Kill