Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new pickup_Cash[MAX_PLAYERS][2];
- #include <YSI\y_hooks>
- hook OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) {
- if(hittype == BULLET_HIT_TYPE_VEHICLE) {
- for(new driver = 0; driver < MAX_PLAYERS; driver++) {
- if(GetPlayerVehicleID(driver) == hitid && GetPlayerVehicleSeat(driver) == 0) {
- if(GetPlayerTeam(driver) == GetPlayerTeam(playerid))
- GameTextForPlayer(driver, "~r~Don't hurt your teammate.", 3000, 4);
- else {
- SetVehicleHealth(hitid, 0);
- }
- break;
- }
- }
- }
- }
- hook OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) {
- if(GetPlayerTeam(issuerid) == GetPlayerTeam(playerid)) {
- GameTextForPlayer(issuerid, "~r~Don't hurt your teammate.", 3000, 4);
- new Float:health;
- GetPlayerHealth(playerid, health);
- SetPlayerHealth(playerid, health+amount);
- }
- }
- hook OnPlayerDeath(playerid, killerid) {
- SetTimerEx("death", 1000, false, "ii", playerid, killerid);
- }
- forward death(playerid, killerid);
- public death(playerid, killerid) {
- SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
- SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
- GivePlayerMoney(playerid, -50);
- GivePlayerMoney(killerid, 50);
- switch(Account[playerid][Team]) {
- case TEAM_GROVE: { //Grove Street Family
- Account[playerid][Team] = TEAM_GROVE;
- SetPlayerColor(playerid, COLOR_GROVE);
- SetSpawnInfo(playerid, TEAM_GROVE, Account[playerid][Skin], 2512.9407, -1665.5356, 13.5741, 94.9650, 5, 1, 22, 500, 0, 0);
- SpawnPlayer(playerid);
- }
- case TEAM_BALLAS: { //Ballas
- Account[playerid][Team] = TEAM_BALLAS;
- SetPlayerColor(playerid, COLOR_BALLAS);
- SetSpawnInfo(playerid, TEAM_BALLAS, Account[playerid][Skin], 1895.5793, -1179.3634, 23.7991, 251.3599, 5, 1, 22, 500, 0, 0);
- SpawnPlayer(playerid);
- }
- case TEAM_VAGOS: { //Vagos
- Account[playerid][Team] = TEAM_VAGOS;
- SetPlayerColor(playerid, COLOR_VAGOS);
- SetSpawnInfo(playerid, TEAM_VAGOS, Account[playerid][Skin], 2791.8083, -1944.4026, 13.5469, 89.6026, 5, 1, 22, 500, 0, 0);
- SpawnPlayer(playerid);
- }
- case TEAM_AZTECAS: { //Aztecas
- Account[playerid][Team] = TEAM_AZTECAS;
- SetPlayerColor(playerid, COLOR_AZTECAS);
- SetSpawnInfo(playerid, TEAM_AZTECAS, Account[playerid][Skin], 1677.5970, -2112.8743, 13.5469, 271.7175, 5, 1, 22, 500, 0, 0);
- SpawnPlayer(playerid);
- }
- case TEAM_BIKERS: { //Bikers
- Account[playerid][Team] = TEAM_BIKERS;
- SetPlayerColor(playerid, COLOR_BIKERS);
- SetSpawnInfo(playerid, TEAM_BIKERS, Account[playerid][Skin], 681.0756, -475.5904, 16.3359, 178.6481, 5, 1, 22, 500, 0, 0);
- SpawnPlayer(playerid);
- }
- case TEAM_SHERIFF: { //Sheriffs
- Account[playerid][Team] = TEAM_SHERIFF;
- SetPlayerColor(playerid, COLOR_SHERIFF);
- SetSpawnInfo(playerid, TEAM_SHERIFF, Account[playerid][Skin], 630.8612, -571.7091, 16.3359, 269.6975, 5, 1, 22, 500, 0, 0);
- SpawnPlayer(playerid);
- }
- case TEAM_POLICE: { //Police
- Account[playerid][Team] = TEAM_POLICE;
- SetPlayerColor(playerid, COLOR_POLICE);
- SetSpawnInfo(playerid, TEAM_POLICE, Account[playerid][Skin], 1544.7908, -1675.7611, 13.5591, 88.5267, 5, 1, 22, 500, 0, 0);
- SpawnPlayer(playerid);
- }
- }
- ShowPlayerDialog(playerid, DIALOG_NOTICE, DIALOG_STYLE_MSGBOX, \
- ""COL_LBLUE"Los Angeles Gangsta"COL_DEF": Notice", \
- "Aw.. It seems like you died..\n\
- You lost all your weapons, "COL_DOLLAR"$200"COL_DEF" and a score.\n\
- But don't worry, you got a 9MM and a bat, enjoy.", \
- "Close", "");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement