public OnPlayerDeath(playerid, killerid, reason)
/*
playerid = Acusado
killerid = Vнtima
*/
GetPlayerVehicleID(playerid)
IsAAviao(carid)
IsAHelicoptero(carid)
new string[256]
new acusado[MAX_PLAYER_NAME], vitima[MAX_PLAYER_NAME];
GetPlayerName(killerid, acusado, MAX_PLAYER_NAME);
GetPlayerName(playerid, vitima, MAX_PLAYER_NAME);
GetPlayerState(killerid) == PLAYER_STATE_DRIVER
format(string, sizeof(string), "[Anti drive-by]: %s cometeu drive-by em %s e serб punido por um admin.", acusado, vitima);
SendClientMessageToAll(0xE60000FF, string);
stock IsAHelicoptero(carid)
{
new modelid = GetVehicleModel(carid);
if(modelid == 563 || modelid == 548 || modelid == 497 || modelid == 488 || modelid == 487)
{
return 1;
}
if(modelid == 425 || modelid == 417 || modelid == 447 || modelid == 469)
{
return 1;
}
return 0;
}
stock IsAAviao(carid)
{
new modelid = GetVehicleModel(carid);
if(modelid == 460 || modelid == 476 || modelid == 511 || modelid == 512)
{
return 1;
}
if(modelid == 513 || modelid == 519 || modelid == 520 || modelid == 553)
{
return 1;
}
if(modelid == 577 || modelid == 592 || modelid == 593)
{
return 1;
}
return 0;
}
public OnPlayerDeath(playerid, killerid, reason){
if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER){
if(IsAHelicoptero(GetPlayerVehicleID(killerid)) || IsAAviao(GetPlayerVehicleID(killerid))) return 1;
new string[256], acusado[MAX_PLAYER_NAME], vitima[MAX_PLAYER_NAME];
GetPlayerName(killerid, acusado, MAX_PLAYER_NAME);
GetPlayerName(playerid, vitima, MAX_PLAYER_NAME);
format(string, sizeof(string), "[Anti drive-by]: %s cometeu drive-by em %s e serб punido por um admin.", acusado, vitima);
SendClientMessageToAll(0xE60000FF, string);
}
return 1;
}
tem como eu colocar para o acusado ir para a prisгo ao matar a vitima ?
|
tem como eu colocar para o acusado ir para a prisгo ao matar a vitima ?
|
public OnPlayerDeath(playerid, killerid, reason) {
if (IsPlayerInAnyVehicle(killerid)) {
new string[100];
new acusado[MAX_PLAYER_NAME];
new vitima[MAX_PLAYER_NAME];
GetPlayerName(killerid, acusado, MAX_PLAYER_NAME);
GetPlayerName(playerid, vitima, MAX_PLAYER_NAME);
format(string, sizeof(string), "[Anti Drive-By]: %s cometeu Drive-by em %s e serб punido por um administrador.", acusado, vitima);
SendClientMessageToAll(0xE60000FF, string);
MandarPrisao(playerid);
}
return 1;
}
forward MandarPrisao(playerid);
public MandarPrisao(playerid) {
print("O jogador foi preso");
return 1;
}
tem como eu colocar para o acusado ir para a prisгo ao matar a vitima ?
|
E seu estiver dentro de um Hydra?
E se o jogador morto estiver dentro de um veнculo tambйm? O cуdigo й falho em alguns sentidos. Quanto a explicaзгo, acho que poderia dar uma melhorada. No mais, parabйns. |