Jump to content

Anti car kill


Recommended Posts

Dnes se ukazeme anti car kill, ale muj vlastni vylepseny

 

nahoru do modu

#define COLOR_RED 0xFF0000AA // define barvy

 

Do OnPlayerDeath(playerid, killerid, reason)

 

new killerstate = GetPlayerState(killerid); //zjisti kde sedi hrac
if(IsPlayerInAnyVehicle(killerid) && (!IsPlayerInAnyVehicle(playerid)) && (killerstate == PLAYER_STATE_DRIVER) && (reason != WEAPON_VEHICLE)) 
{ //slozena podminka
new wang[MAX_PLAYER_NAME], string[256]; //nadefinovani jmena a formatu zpravy
GetPlayerName(killerid, wang, MAX_PLAYER_NAME); // zjisti vrahoho jmeno
format(string, sizeof(string), "Hráč %s porušil pravidla. [Car kill]", wang);//format zpravy
SendClientMessageToAll(COLOR_RED, string); // posle zpravu
SpawnPlayer(killerid); //spawne hrace (vylepsena metoda zabiti)
PlayerPlaySound(killerid,1056,0,0,0); //prehraje hraci zvuk
} //ukoncen podminky

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...