H3ater.SG
Membru-
Posts
7 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Everything posted by H3ater.SG
-
Buna seara. Am incercat sa implementez o comanda de pe gamemode-ul "bugged" (/factions") sa apara applications online sau offline Cand inchid aplicatiile de pe panel, pe server inca apare ca sunt deschise Cum as putea sa fac sa fie identice? Comanda /factions CMD:factions(playerid, params[]) { new members; new stringz2[1024]; for(new xf = 0; xf < MAX_GROUPS; xf++) { if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true)) { new stringy2[256], app; mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d'", xf); new Cache: resultx = mysql_query (handle, stringy2); members = cache_get_row_count(); cache_delete(resultx); mysql_format(handle, stringy2, 256, "SELECT * FROM `groups` WHERE `groupID` = '%d'", xf); new Cache: resultd = mysql_query(handle, stringy2); if(cache_get_row_count() != 0) { cache_get_field_content(0, "groupApplication", result); app = strval(result); } cache_delete(resultd); if(app == 0) { format(stringz2, sizeof(stringz2),"%sID: %d - %s [%d/%d] {00FF00}[applications online]{FFFFFF}n", stringz2,xf, groupVariables[xf][gGroupName], members, groupVariables[xf][gSlots]); } else if(app == 1) { format(stringz2, sizeof(stringz2),"%sID: %d - %s [%d/%d] {FF0000}[applications offline]{FFFFFF}n", stringz2,xf, groupVariables[xf][gGroupName], members, groupVariables[xf][gSlots]); } } ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Server: Factions", stringz2, "Select", "Cancel"); } return 1; } Dialog_factions case DIALOG_FACTIONS: { if(!response) { hidePlayerDialog(playerid); SelFac[playerid] = 0; } else { new f = listitem+1; SelFac[playerid] = f; new szDialogs[512]; new lead[MAX_PLAYER_NAME]; format(lead, MAX_PLAYER_NAME, "None"); new query[256]; format(query, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d' AND `playerGroupRank` = '7'", f); new Cache: masta = mysql_query(handle, query); if(cache_get_row_count() >= 1) { cache_get_field_content(0, "playerName", result); format(lead, MAX_PLAYER_NAME, result); } cache_delete(masta); format(query, 256, "SELECT * FROM `playeraccounts` WHERE `playerGroup` = '%d'", f); new Cache: mastau = mysql_query(handle, query); new membs = cache_get_row_count(); cache_delete(mastau); mysql_format(handle, query, 256, "SELECT * FROM groups WHERE groupID = '%d'", f); new Cache: val = mysql_query(handle, query); new apply; new apply2[64]; if(cache_get_row_count() >= 1) { cache_get_field_content(0, "groupApplication", result); apply = strval(result); } cache_delete(val); if(apply == 0) { format(apply2, 64, "Online"); } else { format(apply2, 64, "Offline"); } new onmembers; foreach(Player, i) { if(playerVariables[pGroup] == f) { onmembers++; } } if(strlen(lead) >= 1 && strcmp(lead, "None", true)) { new id = GetPlayerID(lead); if(id != INVALID_PLAYER_ID) { format(szDialogs, 512, "Faction info:nnFaction name: %snLeader: %s(online)nMembers: %d/%dnOnline members: %dnApplications: %s", groupVariables[f][gGroupName], lead, membs, groupVariables[f][gSlots], onmembers, apply2); } else { format(szDialogs, 512, "Faction info:nnFaction name: %snLeader: %s(offline)nMembers: %d/%dnOnline members: %dnApplications: %s", groupVariables[f][gGroupName], lead, membs, groupVariables[f][gSlots], onmembers, apply2); } } else { format(szDialogs, 512, "Faction info:nnFaction name: %snLeader: NonenMembers: %d/%dnOnline members: %d", groupVariables[f][gGroupName], membs, groupVariables[f][gSlots], onmembers, apply2); } ShowPlayerDialog(playerid, DIALOG_FACTIONS2, DIALOG_STYLE_MSGBOX, "Server: Factions", szDialogs, "Close", ""); } } case DIALOG_FACTIONS2: { hidePlayerDialog(playerid); }
-
Problema intalnita (descriere): Cat cineva te omoara nu te spawneaza la casa/spawn/hq.. te spawneaza la ferma pe camp Ero(area / rile) / warning-(ul / urile): Liniile de cod / sursa / script-ul(obligatoriu): public OnPlayerSpawn(playerid) { #if defined DEBUG printf("[debug] OnPlayerSpawn(%d)", playerid); #endif Alive[playerid] = 1; CheckDelay[playerid] = 2; SpawnTimes[playerid]++; if(SpawnTimes[playerid]==1) Distance[playerid] = 0; StopAudioStreamForPlayer(playerid); SetPlayerSkin(playerid, playerVariables[playerid][pSkin]); SetPlayerHealth(playerid, 99); for(new i=0; i<10; i++) { SendDeathMessageToPlayer(playerid,202, 202, 202); } TextDrawHideForPlayer(playerid, DMV2[playerid]); TextDrawHideForPlayer(playerid, DMV1[playerid]); PreloadAnimLib(playerid,"BOMBER"); PreloadAnimLib(playerid,"RAPPING"); PreloadAnimLib(playerid,"SHOP"); PreloadAnimLib(playerid,"BEACH"); PreloadAnimLib(playerid,"SMOKING"); PreloadAnimLib(playerid,"ON_LOOKERS"); PreloadAnimLib(playerid,"DEALER"); PreloadAnimLib(playerid,"CRACK"); PreloadAnimLib(playerid,"CARRY"); PreloadAnimLib(playerid,"COP_AMBIENT"); PreloadAnimLib(playerid,"PARK"); PreloadAnimLib(playerid,"INT_HOUSE"); PreloadAnimLib(playerid,"FOOD"); PreloadAnimLib(playerid,"GANGS"); PreloadAnimLib(playerid,"PED"); PreloadAnimLib(playerid,"FAT"); TogglePlayerSpectating(playerid, 0); playerVariables[playerid][pWeapons][0] = 0; playerVariables[playerid][pWeapons][1] = 0; playerVariables[playerid][pWeapons][2] = 0; playerVariables[playerid][pWeapons][3] = 0; playerVariables[playerid][pWeapons][4] = 0; playerVariables[playerid][pWeapons][5] = 0; playerVariables[playerid][pWeapons][6] = 0; playerVariables[playerid][pWeapons][7] = 0; playerVariables[playerid][pWeapons][8] = 0; playerVariables[playerid][pWeapons][9] = 0; playerVariables[playerid][pWeapons][10] = 0; playerVariables[playerid][pWeapons][11] = 0; playerVariables[playerid][pWeapons][12] = 0; SetPlayerToTeamColor(playerid); SetPlayerFightingStyle(playerid, playerVariables[playerid][pFightStyle]); HUndercover[playerid] = 0; if(playerVariables[playerid][pPrisonTime] >= 1) { switch(playerVariables[playerid][pPrisonID]) { case 2: { ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 10); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid, 223.15, 110.0, 999.02); } case 3: { ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 6); new spawn = random(sizeof(JailSpawns)); SetPlayerPos(playerid, JailSpawns[spawn][0], JailSpawns[spawn][1], JailSpawns[spawn][2]); SetPlayerFacingAngle(playerid, 0); } } return 1; } new rand; if(PlayerPaintballing[playerid] != 0) { GivePlayerWeaponEx(playerid, pgunp, 9999); curatj[playerid] = 1; rand = random(sizeof(PaintballSpawns)); SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]); SetPlayerInterior(playerid, 10); SetPlayerSkin(playerid, 250); return 1; } if((playerVariables[playerid][pPDuty] == 1) && (playerVariables[playerid][pGroup] == 1|| playerVariables[playerid][pGroup] == 2 || playerVariables[playerid][pGroup] == 3 || playerVariables[playerid][pGroup] == 5)) { GivePlayerWeapon(playerid, 24, 9999); GivePlayerWeapon(playerid, 31, 9999); GivePlayerWeapon(playerid, 29, 9999); GivePlayerWeapon(playerid, 41, 9999); playerVariables[playerid][pWeapons][0] = 24; playerVariables[playerid][pWeapons][1] = 31; playerVariables[playerid][pWeapons][2] = 29; playerVariables[playerid][pWeapons][3] = 41; SetPlayerHealth(playerid, 99); SetPlayerArmour(playerid, 99); } if(playerVariables[playerid][pSpawnChange] == 1) { new houseID = getPlayerHouseID(playerid); new houserented = playerVariables[playerid][pHouseRented]; if(houseID >= 1) { SetPlayerInterior(playerid, houseVariables[houseID][hHouseInteriorID]); SetPlayerVirtualWorld(playerid, HOUSE_VIRTUAL_WORLD+houseID); SetPlayerPos(playerid, houseVariables[houseID][hHouseInteriorPos][0], houseVariables[houseID][hHouseInteriorPos][1], houseVariables[houseID][hHouseInteriorPos][2]); InHouse[playerid] = houseID; if(houseVariables[houseID][hStreamType] == 2) { YoutubeStreamForPlayer(playerid, houseVariables[houseID][hStream]); } else if(houseVariables[houseID][hStreamType] == 1) { PlayAudioStreamForPlayer(playerid, houseVariables[houseID][hStream]); } } else { if(houserented >= 1) { SetPlayerInterior(playerid, houseVariables[houserented][hHouseInteriorID]); SetPlayerVirtualWorld(playerid, HOUSE_VIRTUAL_WORLD+houserented); SetPlayerPos(playerid, houseVariables[houserented][hHouseInteriorPos][0], houseVariables[houserented][hHouseInteriorPos][1], houseVariables[houserented][hHouseInteriorPos][2]); InHouse[playerid] = houserented; } else { playerVariables[playerid][pSpawnChange] = 0; } } } if(playerVariables[playerid][pSpawnChange] == 0) { if(playerVariables[playerid][pGroup] == 0) { SetPlayerPos(playerid, 1800.1593,-1863.6956,13.5748); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); } else { new group; group = playerVariables[playerid][pGroup]; SetPlayerPos(playerid, groupVariables[group][gGroupInteriorPos][0], groupVariables[group][gGroupInteriorPos][1], groupVariables[group][gGroupInteriorPos][2]); SetPlayerInterior(playerid, groupVariables[group][gGroupHQInteriorID]); SetPlayerVirtualWorld(playerid, GROUP_VIRTUAL_WORLD+group); } } SetCameraBehindPlayer(playerid); ResetPlayerWeapons(playerid); givePlayerWeapons(playerid); SetPlayerWeather(playerid, 1); syncPlayerTime(playerid); SetPlayerSpawn(playerid); TogglePlayerControllable(playerid, true); return 1; } public OnPlayerDeath(playerid, killerid, reason) { Alive[playerid] = 0; CheckDelay[playerid] = 10; TextDrawHideForPlayer(playerid, Status[playerid]); new vehicleid = GetPlayerVehicleID(playerid); if(vehicleVariables[vehicleid][vVehicleJob] == 7) { format(szMessage, sizeof(szMessage), "Job failed."); SCM(playerid, COLOR_NOB, szMessage); SetVehicleToRespawnEx(vehicleid); KillTimer(mowertimer[playerid]); MowerMoney[playerid] = 0; TextDrawHideForPlayer(playerid,Mower[playerid]); playerVariables[playerid][pFarmerMoney] = 0; } if(PlayerPaintballing[playerid] != 0) { foreach(Player, x) { if((PlayerPaintballing[playerid] != 0 && PlayerPaintballing[killerid] != 0) && PlayerPaintballing[x]) { SendDeathMessageToPlayer(x, killerid, playerid, reason); } } new string[500]; new pinfo[128]; KillP[killerid]++; DeathP[playerid]++; format(string, sizeof(string), "You have killed %s. You now have %d kills.",GetName(playerid), KillP[killerid]); SendClientMessage(killerid, COLOR_GENANNOUNCE, string); format(string, sizeof(string), "You have been killed by %s.",GetName(killerid)); SendClientMessage(playerid, COLOR_GENANNOUNCE, string); PlayerPaintballScore[killerid] = KillP[killerid]; if(PlayerPaintballScore[killerid] > PaintballWinnerScore) { PaintballWinner = killerid; PaintballWinnerScore = PlayerPaintballScore[killerid]; foreach(Player,i) { if(IsPlayerConnected(i)) { if(PlayerPaintballing != 0) { format(pinfo,sizeof(pinfo),"%s is now in lead with %d kills.",GetName(PaintballWinner),PaintballWinnerScore); SCM(i, COLOR_YELLOW, pinfo); } } } } return 1; } KillTimer(mowertimer[playerid]); if(playerVariables[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(playerVariables[killerid][pGroup] == 12) { if(GoChase[killerid] == playerid) { new string[256]; new killer[MAX_PLAYER_NAME]; new name[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); GetPlayerName(playerid, name, sizeof(name)); playerVariables[killerid][pMoney] += playerVariables[playerid][pHeadValue]; format(string,128,"%s has succesfully completed the contract on %s for $%d, distance: %.0fm.",killer,name,playerVariables[playerid][pHeadValue], GetDistanceBetweenPlayers(killerid, playerid)); SendToGroup(12, COLOR_HIT, string); playerVariables[playerid][pHeadValue] = -1; GotHit[playerid] = 0; GetChased[playerid] = 999; GoChase[killerid] = 999; } } } } new turfkiller, turfplayerid; for(new i = 0; i <= sizeof(TurfInfo); i++) { if(IsPlayerInTurf(playerid, i) == 1) { turfplayerid = i; break; } } for(new i = 0; i <= sizeof(TurfInfo); i++) { if(IsPlayerInTurf(killerid, i) == 1) { turfkiller = i; break; } } new string[256]; if(WarInfo[turfplayerid][wTime] > 0 && WarInfo[turfkiller][wTime] > 0) { if(turfplayerid == turfkiller) { if(playerVariables[playerid][pGroup] == WarInfo[turfplayerid][wAttacker] && playerVariables[killerid][pGroup] == WarInfo[turfplayerid][wFaction]) { playerVariables[playerid][pWarDeaths] += 1; format(string, sizeof(string), "You have been killed by %s (%i)", playerVariables[killerid][pNormalName], killerid); SCM(playerid, COLOR_GENANNOUNCE, string); groupVariables[WarInfo[turfkiller][wFaction]][gScore] += 1; playerVariables[killerid][pWarScore] += 1; format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid); SCM(killerid, COLOR_GENANNOUNCE, string); foreach(Player, x) { if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction]) { SendDeathMessageToPlayer(x, killerid, playerid, reason); } } SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ."); } else if(playerVariables[killerid][pGroup] == WarInfo[turfkiller][wAttacker] && playerVariables[playerid][pGroup] == WarInfo[turfkiller][wFaction]) { playerVariables[playerid][pWarDeaths] += 1; format(string, sizeof(string), "You have been killed by %s (%i).", playerVariables[killerid][pNormalName], killerid); SCM(playerid, COLOR_GENANNOUNCE, string); groupVariables[WarInfo[turfplayerid][wAttacker]][gScore] += 1; playerVariables[killerid][pWarScore] += 1; format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid); SCM(killerid, COLOR_GENANNOUNCE, string); foreach(Player, x) { if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction]) { SendDeathMessageToPlayer(x, killerid, playerid, reason); } } SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in group HQ."); } } } if((WarInfo[turfkiller][wTime] != 0 && (WarInfo[turfkiller][wAttacker] == playerVariables[playerid][pGroup] || WarInfo[turfkiller][wFaction] == playerVariables[playerid][pGroup]) && playerVariables[playerid][pGroup] != 0) || (playerVariables[killerid][pGroup] == 1 || playerVariables[killerid][pGroup] == 2 || playerVariables[killerid][pGroup] == 3 || playerVariables[killerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == 1 || playerVariables[playerid][pGroup] == 2 || playerVariables[playerid][pGroup] == 3 || playerVariables[playerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == playerVariables[killerid][pGroup]) || (PlayerPaintballing[killerid] >= 1)) { } else { WantedID[playerid] = killerid; SCM(playerid, COLOR_GENANNOUNCE, "You have been attacked by another player. You have 60 seconds to call the police to report this crime. Use /call 112."); WantedIDTime[playerid] = 60; } //SetTimerEx("Spawn", 3999, 0, "d", playerid); SetPlayerHealth(playerid, 0); killerid = INVALID_PLAYER_ID; return 1; } Imagini / Video (optional): Ati incercat sa rezolvati singur?: nu.. nu stiu ce trebe sa fac
-
public OnPlayerSpawn(playerid) { #if defined DEBUG printf("[debug] OnPlayerSpawn(%d)", playerid); #endif Alive[playerid] = 1; CheckDelay[playerid] = 2; SpawnTimes[playerid]++; if(SpawnTimes[playerid]==1) Distance[playerid] = 0; StopAudioStreamForPlayer(playerid); SetPlayerSkin(playerid, playerVariables[playerid][pSkin]); SetPlayerHealth(playerid, 99); for(new i=0; i<10; i++) { SendDeathMessageToPlayer(playerid,202, 202, 202); } TextDrawHideForPlayer(playerid, DMV2[playerid]); TextDrawHideForPlayer(playerid, DMV1[playerid]); PreloadAnimLib(playerid,"BOMBER"); PreloadAnimLib(playerid,"RAPPING"); PreloadAnimLib(playerid,"SHOP"); PreloadAnimLib(playerid,"BEACH"); PreloadAnimLib(playerid,"SMOKING"); PreloadAnimLib(playerid,"ON_LOOKERS"); PreloadAnimLib(playerid,"DEALER"); PreloadAnimLib(playerid,"CRACK"); PreloadAnimLib(playerid,"CARRY"); PreloadAnimLib(playerid,"COP_AMBIENT"); PreloadAnimLib(playerid,"PARK"); PreloadAnimLib(playerid,"INT_HOUSE"); PreloadAnimLib(playerid,"FOOD"); PreloadAnimLib(playerid,"GANGS"); PreloadAnimLib(playerid,"PED"); PreloadAnimLib(playerid,"FAT"); TogglePlayerSpectating(playerid, 0); playerVariables[playerid][pWeapons][0] = 0; playerVariables[playerid][pWeapons][1] = 0; playerVariables[playerid][pWeapons][2] = 0; playerVariables[playerid][pWeapons][3] = 0; playerVariables[playerid][pWeapons][4] = 0; playerVariables[playerid][pWeapons][5] = 0; playerVariables[playerid][pWeapons][6] = 0; playerVariables[playerid][pWeapons][7] = 0; playerVariables[playerid][pWeapons][8] = 0; playerVariables[playerid][pWeapons][9] = 0; playerVariables[playerid][pWeapons][10] = 0; playerVariables[playerid][pWeapons][11] = 0; playerVariables[playerid][pWeapons][12] = 0; SetPlayerToTeamColor(playerid); SetPlayerFightingStyle(playerid, playerVariables[playerid][pFightStyle]); HUndercover[playerid] = 0; if(playerVariables[playerid][pPrisonTime] >= 1) { switch(playerVariables[playerid][pPrisonID]) { case 2: { ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 10); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid, 223.15, 110.0, 999.02); } case 3: { ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 6); new spawn = random(sizeof(JailSpawns)); SetPlayerPos(playerid, JailSpawns[spawn][0], JailSpawns[spawn][1], JailSpawns[spawn][2]); SetPlayerFacingAngle(playerid, 0); } } return 1; } new rand; if(PlayerPaintballing[playerid] != 0) { GivePlayerWeaponEx(playerid, pgunp, 9999); curatj[playerid] = 1; rand = random(sizeof(PaintballSpawns)); SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]); SetPlayerInterior(playerid, 10); SetPlayerSkin(playerid, 250); return 1; } if((playerVariables[playerid][pPDuty] == 1) && (playerVariables[playerid][pGroup] == 1|| playerVariables[playerid][pGroup] == 2 || playerVariables[playerid][pGroup] == 3 || playerVariables[playerid][pGroup] == 5)) { GivePlayerWeapon(playerid, 24, 9999); GivePlayerWeapon(playerid, 31, 9999); GivePlayerWeapon(playerid, 29, 9999); GivePlayerWeapon(playerid, 41, 9999); playerVariables[playerid][pWeapons][0] = 24; playerVariables[playerid][pWeapons][1] = 31; playerVariables[playerid][pWeapons][2] = 29; playerVariables[playerid][pWeapons][3] = 41; SetPlayerHealth(playerid, 99); SetPlayerArmour(playerid, 99); } if(playerVariables[playerid][pSpawnChange] == 1) { new houseID = getPlayerHouseID(playerid); new houserented = playerVariables[playerid][pHouseRented]; if(houseID >= 1) { SetPlayerInterior(playerid, houseVariables[houseID][hHouseInteriorID]); SetPlayerVirtualWorld(playerid, HOUSE_VIRTUAL_WORLD+houseID); SetPlayerPos(playerid, houseVariables[houseID][hHouseInteriorPos][0], houseVariables[houseID][hHouseInteriorPos][1], houseVariables[houseID][hHouseInteriorPos][2]); InHouse[playerid] = houseID; if(houseVariables[houseID][hStreamType] == 2) { YoutubeStreamForPlayer(playerid, houseVariables[houseID][hStream]); } else if(houseVariables[houseID][hStreamType] == 1) { PlayAudioStreamForPlayer(playerid, houseVariables[houseID][hStream]); } } else { if(houserented >= 1) { SetPlayerInterior(playerid, houseVariables[houserented][hHouseInteriorID]); SetPlayerVirtualWorld(playerid, HOUSE_VIRTUAL_WORLD+houserented); SetPlayerPos(playerid, houseVariables[houserented][hHouseInteriorPos][0], houseVariables[houserented][hHouseInteriorPos][1], houseVariables[houserented][hHouseInteriorPos][2]); InHouse[playerid] = houserented; } else { playerVariables[playerid][pSpawnChange] = 0; } } } if(playerVariables[playerid][pSpawnChange] == 0) { if(playerVariables[playerid][pGroup] == 0) { SetPlayerPos(playerid, 1800.1593,-1863.6956,13.5748); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); } else { new group; group = playerVariables[playerid][pGroup]; SetPlayerPos(playerid, groupVariables[group][gGroupInteriorPos][0], groupVariables[group][gGroupInteriorPos][1], groupVariables[group][gGroupInteriorPos][2]); SetPlayerInterior(playerid, groupVariables[group][gGroupHQInteriorID]); SetPlayerVirtualWorld(playerid, GROUP_VIRTUAL_WORLD+group); } } SetCameraBehindPlayer(playerid); ResetPlayerWeapons(playerid); givePlayerWeapons(playerid); SetPlayerWeather(playerid, 1); syncPlayerTime(playerid); SetPlayerSpawn(playerid); TogglePlayerControllable(playerid, true); return 1; } public OnPlayerDeath(playerid, killerid, reason) { Alive[playerid] = 0; CheckDelay[playerid] = 10; TextDrawHideForPlayer(playerid, Status[playerid]); new vehicleid = GetPlayerVehicleID(playerid); if(vehicleVariables[vehicleid][vVehicleJob] == 7) { format(szMessage, sizeof(szMessage), "Job failed."); SCM(playerid, COLOR_NOB, szMessage); SetVehicleToRespawnEx(vehicleid); KillTimer(mowertimer[playerid]); MowerMoney[playerid] = 0; TextDrawHideForPlayer(playerid,Mower[playerid]); playerVariables[playerid][pFarmerMoney] = 0; } if(PlayerPaintballing[playerid] != 0) { foreach(Player, x) { if((PlayerPaintballing[playerid] != 0 && PlayerPaintballing[killerid] != 0) && PlayerPaintballing[x]) { SendDeathMessageToPlayer(x, killerid, playerid, reason); } } new string[500]; new pinfo[128]; KillP[killerid]++; DeathP[playerid]++; format(string, sizeof(string), "You have killed %s. You now have %d kills.",GetName(playerid), KillP[killerid]); SendClientMessage(killerid, COLOR_GENANNOUNCE, string); format(string, sizeof(string), "You have been killed by %s.",GetName(killerid)); SendClientMessage(playerid, COLOR_GENANNOUNCE, string); PlayerPaintballScore[killerid] = KillP[killerid]; if(PlayerPaintballScore[killerid] > PaintballWinnerScore) { PaintballWinner = killerid; PaintballWinnerScore = PlayerPaintballScore[killerid]; foreach(Player,i) { if(IsPlayerConnected(i)) { if(PlayerPaintballing != 0) { format(pinfo,sizeof(pinfo),"%s is now in lead with %d kills.",GetName(PaintballWinner),PaintballWinnerScore); SCM(i, COLOR_YELLOW, pinfo); } } } } return 1; } KillTimer(mowertimer[playerid]); if(playerVariables[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(playerVariables[killerid][pGroup] == 12) { if(GoChase[killerid] == playerid) { new string[256]; new killer[MAX_PLAYER_NAME]; new name[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); GetPlayerName(playerid, name, sizeof(name)); playerVariables[killerid][pMoney] += playerVariables[playerid][pHeadValue]; format(string,128,"%s has succesfully completed the contract on %s for $%d, distance: %.0fm.",killer,name,playerVariables[playerid][pHeadValue], GetDistanceBetweenPlayers(killerid, playerid)); SendToGroup(12, COLOR_HIT, string); playerVariables[playerid][pHeadValue] = -1; GotHit[playerid] = 0; GetChased[playerid] = 999; GoChase[killerid] = 999; } } } } new turfkiller, turfplayerid; for(new i = 0; i <= sizeof(TurfInfo); i++) { if(IsPlayerInTurf(playerid, i) == 1) { turfplayerid = i; break; } } for(new i = 0; i <= sizeof(TurfInfo); i++) { if(IsPlayerInTurf(killerid, i) == 1) { turfkiller = i; break; } } new string[256]; if(WarInfo[turfplayerid][wTime] > 0 && WarInfo[turfkiller][wTime] > 0) { if(turfplayerid == turfkiller) { if(playerVariables[playerid][pGroup] == WarInfo[turfplayerid][wAttacker] && playerVariables[killerid][pGroup] == WarInfo[turfplayerid][wFaction]) { playerVariables[playerid][pWarDeaths] += 1; format(string, sizeof(string), "You have been killed by %s (%i)", playerVariables[killerid][pNormalName], killerid); SCM(playerid, COLOR_GENANNOUNCE, string); groupVariables[WarInfo[turfkiller][wFaction]][gScore] += 1; playerVariables[killerid][pWarScore] += 1; format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid); SCM(killerid, COLOR_GENANNOUNCE, string); foreach(Player, x) { if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction]) { SendDeathMessageToPlayer(x, killerid, playerid, reason); } } SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ."); } else if(playerVariables[killerid][pGroup] == WarInfo[turfkiller][wAttacker] && playerVariables[playerid][pGroup] == WarInfo[turfkiller][wFaction]) { playerVariables[playerid][pWarDeaths] += 1; format(string, sizeof(string), "You have been killed by %s (%i).", playerVariables[killerid][pNormalName], killerid); SCM(playerid, COLOR_GENANNOUNCE, string); groupVariables[WarInfo[turfplayerid][wAttacker]][gScore] += 1; playerVariables[killerid][pWarScore] += 1; format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid); SCM(killerid, COLOR_GENANNOUNCE, string); foreach(Player, x) { if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction]) { SendDeathMessageToPlayer(x, killerid, playerid, reason); } } SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in group HQ."); } } } if((WarInfo[turfkiller][wTime] != 0 && (WarInfo[turfkiller][wAttacker] == playerVariables[playerid][pGroup] || WarInfo[turfkiller][wFaction] == playerVariables[playerid][pGroup]) && playerVariables[playerid][pGroup] != 0) || (playerVariables[killerid][pGroup] == 1 || playerVariables[killerid][pGroup] == 2 || playerVariables[killerid][pGroup] == 3 || playerVariables[killerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == 1 || playerVariables[playerid][pGroup] == 2 || playerVariables[playerid][pGroup] == 3 || playerVariables[playerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == playerVariables[killerid][pGroup]) || (PlayerPaintballing[killerid] >= 1)) { } else { WantedID[playerid] = killerid; SCM(playerid, COLOR_GENANNOUNCE, "You have been attacked by another player. You have 60 seconds to call the police to report this crime. Use /call 112."); WantedIDTime[playerid] = 60; } //SetTimerEx("Spawn", 3999, 0, "d", playerid); SetPlayerHealth(playerid, 0); killerid = INVALID_PLAYER_ID; return 1; }
-
Buna seara. La server am un bug, atunci cand esto omorat ,chiar daca esti leader,membru sau civil te spawneaza pe camp la ferma.. iar cand iti dai respawn te spawneaza normal.. Cum as putea rezolva asta?
-
Multumesc.. acum imi da urmatoarea erroare error 025: function heading differs from prototype la linia public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) si nu imi dau seama cum sa o rezolv
-
am cautat si acolo..nu sunt
-
Buna seara. Am incercat sa rulez gamemode-ul Virtual-RPG dar la compilare primesc erori de la lipsa unor include. Am cautat pe net si am gasit doar cateva.. ce nu gasesc sunt acestea #include <mgbull> #include <ctpc> #include <ezBrief> Ma poate ajuta cineva cu aceste include ?