Szerző Téma: Ban ölés után  (Megtekintve 518 alkalommal)

Nem elérhető Flips

Ban ölés után
« Dátum: 2015. December 04. - 16:48:12 »
0 Show voters
Helló! A lényeg az legyen ha valaki megöl valakit automatikusan kapjon 1 órás bant azzal az indokkal hogy: Ez nem DM szerver!
Előre is köszönöm.
Ugye PPC és abba ez van:
 
// This callback gets called whenever a player dies
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid, Text:Textdraw0);
// Setup local variables
new VictimName[24], KillerName[24], Msg[128];
// Clear the missiontext
TextDrawSetString(APlayerData[playerid][MissionText], \" \");
// Hide the missiontext for this player (when the player is choosing a class, it\'s not required to show any mission-text)
TextDrawHideForPlayer(playerid, APlayerData[playerid][MissionText]);
// Stop any job that may have started
switch (APlayerData[playerid][PlayerClass])
{
case ClassTruckDriver: Trucker_EndJob(playerid);
case ClassBusDriver: BusDriver_EndJob(playerid);
case ClassPilot: Pilot_EndJob(playerid);
case ClassPolice: Police_EndJob(playerid);
case ClassMafia: Mafia_EndJob(playerid);
case ClassCourier: Courier_EndJob(playerid);
case ClassAssistance: Assistance_EndJob(playerid);
case ClassRoadWorker: Roadworker_EndJob(playerid);
}
// If the player is part of a convoy, kick him from it
Convoy_Leave(playerid);
// If another player kills you, he\'ll get an extra star of his wanted level
if (killerid != INVALID_PLAYER_ID)
{
// Increase the wanted level of the killer by one star
    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
    // Get the name of the killed player and the killer
    GetPlayerName(playerid, VictimName, sizeof(VictimName));
    GetPlayerName(killerid, KillerName, sizeof(KillerName));
    // Let the killed know the police are informed about the kill
format(Msg, 128, \"{FF0000}Megölted őt: {FFFF00}%s{FF0000}, ezért most köröz a rendőrség\", VictimName);
SendClientMessage(killerid, 0xFFFFFFFF, Msg);
// Inform all police players about the kill
format(Msg, 128, \"{00FF00}Játékos {FFFF00}%s{00FF00} megölte {FFFF00}%s{00FF00}, kapjátok el\", KillerName, VictimName);
Police_SendMessage(Msg);
}
return 1;
}

 
Ami szerintem kell belőle az ez:
 
   // If another player kills you, he\'ll get an extra star of his wanted level
if (killerid != INVALID_PLAYER_ID)
{
// Increase the wanted level of the killer by one star
    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
    // Get the name of the killed player and the killer
    GetPlayerName(playerid, VictimName, sizeof(VictimName));
    GetPlayerName(killerid, KillerName, sizeof(KillerName));
    // Let the killed know the police are informed about the kill
format(Msg, 128, \"{FF0000}Megölted őt: {FFFF00}%s{FF0000}, ezért most köröz a rendőrség\", VictimName);
SendClientMessage(killerid, 0xFFFFFFFF, Msg);
// Inform all police players about the kill
format(Msg, 128, \"{00FF00}Játékos {FFFF00}%s{00FF00} megölte {FFFF00}%s{00FF00}, kapjátok el\", KillerName, VictimName);
Police_SendMessage(Msg);
}
return 1;
}

 
Ezt kéne átformázni arra hogy bant kapjon és ne körözési szintet
« Utoljára szerkesztve: 2015. December 04. - 16:55:26 írta Flips »

Ban ölés után
« Válasz #1 Dátum: 2015. December 07. - 15:16:50 »
0 Show voters
SCMSG-vel kiíratod neki amit akarsz, hogy ez nem DM szerver.
Kimásolod a tempbanos adminparancs alól a lényeget, és annyi hogy nem a paraméterekből szopod ki az időt meg a playert, hanem az már neked megvan hogy a playerid-t kell bannolni, és 1 órára. A többit onnantól a mod lekezeli.
Sok sikert ;)  :wave:

Nem elérhető Flips

Ban ölés után
« Válasz #2 Dátum: 2015. December 13. - 19:47:46 »
0 Show voters
Megoldottam. Köszi a segítséged.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal