27.06.2012, 04:19
Код:
stock HeadshotCheck(playerid, &Float:x, &Float:y, &Float:z) { new Float:fx,Float:fy,Float:fz; GetPlayerCameraFrontVector(playerid, fx, fy, fz); new Float:cx,Float:cy,Float:cz; GetPlayerCameraPos(playerid, cx, cy, cz); for(new Float:f = 0.0; f < 100; f = f + 0.5) { x = fx * f + cx; y = fy * f + cy; z = fz * f + cz; foreach(Player, i) { if(i != playerid) { if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_DUCK) { if(IsPlayerInRangeOfPoint(i, 0.4, x, y, z)) { if(PlayerInfo[i][pHeadValue] > 0) { if(GoChase[playerid] == i) { new string[128]; new takemoney = PlayerInfo[i][pHeadValue] / 4 * 2; GivePlayerCash(playerid, takemoney); GivePlayerCash(i, -takemoney); SetPlayerHealth(i, 0); format(string,sizeof(string),"Hitman %s has fulfilled the contract on %s and collected $%d.",GetPlayerNameEx(playerid),GetPlayerNameEx(i),PlayerInfo[i][pHeadValue] / 4 * 2); SendFamilyMessage(8, COLOR_YELLOW, string); format(string,sizeof(string),"You have been critically injured by a hitman and lost $%d!",takemoney); // SpawnPlayer(playerid); SendClientMessageEx(i, COLOR_YELLOW, string); PlayerInfo[i][pHeadValue] = 0; PlayerInfo[playerid][pCHits] += 1; // KillEMSQueue(playerid); GoChase[GetChased[playerid]] = 999; PlayerInfo[playerid][pC4Used] = 0; PlayerInfo[playerid][pC4] = 0; GotHit[playerid] = 0; GetChased[playerid] = 999; } } } else { if(IsPlayerInRangeOfPoint(i, 0.4, x, y, z - 0.7)) { if(PlayerInfo[i][pHeadValue] > 0) { if(GoChase[playerid] == i) { new string[128]; new takemoney = PlayerInfo[i][pHeadValue] / 4 * 2; GivePlayerCash(playerid, takemoney); GivePlayerCash(i, -takemoney); SetPlayerHealth(i, 0); format(string,sizeof(string),"Hitman %s has fulfilled the contract on %s and collected $%d.",GetPlayerNameEx(playerid),GetPlayerNameEx(i),PlayerInfo[i][pHeadValue] / 4 * 2); SendFamilyMessage(8, COLOR_YELLOW, string); format(string,sizeof(string),"You have been critically injured by a hitman and lost $%d!",takemoney); // SpawnPlayer(playerid); SendClientMessageEx(i, COLOR_YELLOW, string); PlayerInfo[i][pHeadValue] = 0; PlayerInfo[playerid][pCHits] += 1; // KillEMSQueue(playerid); GoChase[GetChased[playerid]] = 999; PlayerInfo[playerid][pC4Used] = 0; PlayerInfo[playerid][pC4] = 0; GotHit[playerid] = 0; GetChased[playerid] = 999; } } } } } } } return 1; }
Please respond and help soon as possible
//Errors
error 017: undefined symbol "PlayerInfo"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line